It depends on what sort of vinegar you mean... malt, wine or cider ! Malt vinegar is fermented from barley malt, wine vinegar from wine and cider vinegar from cider...
It's basically diluted acetic acid, with various impurities (which give it its flavour) derived from the particular substance (e.g. malt),which is fermented.
The Romans used it to make 'posca' which was wine that had gone sour. They mixed with water and honey to make it more palatable, it was often considered refreshing by the legions on long marches.
It is thought that it was posca that was offered to Jesus on the cross.