Vinegar is made by over-fermenting alcohol. It comes from many sources; white vinegar is from grains, apple cider vinegar is from apples, and malt vinegar is made from barley. You can read more about this and how to make your own vinegar here: http://howtomakevinegar.com/.
Most vinegars are made from wines, like red wine and rice wine. It is made by placing a bacterial culture, called a "mother," and letting it ferment which creates the tart acetic acid. To learn more about vinegar, please see http://www.ask.com/wiki/Vinegar.
Vinegar is made from the juices of fruits, grains, or vegetables. Warmth and time causes the sugars and alcohol in these products causes acetic acid. You need this acid for vinegar. Then different process and ingredients are used to create different typos of vinegar.