Symptom: It smells like vinegar.
Cause 1: Bacteria In this case, it probably is. Aceto bacteria (vinegar producing) and Lacto bacteria (lactic acid producing) are common contaminates in breweries. Sometimes the infection will produce sweet smells like malt vinegar, other times they will produce cidery smells. It will depend on which bug is living in your wort. Aceto bacteria often produce ropy strands of jelly which can be a good visual indicator, as can excessive cloudiness, after several weeks in the fermentor (although some cloudiness is not unusual, especially in all-grain beers).
Cure: If you don't like the taste, then pour it out. Lactic infections are desired in some beer styles.
Cause 2: Wild Yeast/Bacteria Two other bugs are also common, Brettanomyces and Pediococcus. Brettanomyces is supposed to smell like horse sweat or a horse blanket. Raise your hand if you know what a horse smells like. From sweat, I mean. Anyone? I think Brettanomyces smells like leather, myself. Pediococcus can produce diacetyl and acidic aromas and flavors.
One man's garbage can be another man's gold though. These two cultures and Lacto bacteria are actually essential to the Belgian Lambic beer styles. Under other circumstances and styles, beers that taste like Lambics would be discarded instead of being carefully nurtured and blended over a two year period. Lambic beers have a pronounced tartness with fruity overtones. This type of beer is very refreshing and is excellent with heavy food.
Cure: Be meticulous in your sanitation or investigate Lambic brewing.