Vinegar is mostly water with some (varying) levels of acetic acid. The acetic acid is usually chemically produced nowadays, but can also be gotten from fermented potatos, grain, malt, or rice; or from apple cider or wine.
It depends on the type of vinegar. Vinegar is a fermented substance. For example, coconut vinegar is made from fermented coconut milk, malt vinegar is made from barley. Vinegar is very acidic.