Vinegar is a polar substance, and its molecules are attracted to water molecules (called "hydrophilic"). Therefore, it is able to be mixed with water. It does not technically dissolve; rather, it forms a homogenous solution with water.
Vinegar is the result of a fermentation of ethanol, which produces the main ingredient in vinegar, acetic acid. Acetic acid is defined as a polar small organic acid, and its chemical formula is C2H402.
Interaction With Water
Water is a highly polar substance, and when two polar substances interact, they mix together and form a homogeneous solution, meaning the solution is uniform in appearance and texture. In water, acetic acid releases hydrogen ions. It isn't quite dissolving, but rather forming a combination of the two substances.
In contrast to a hydrophilic substance like acetic acid, hydrophobic substances do not dissolve or mix with water. The most famous example of this is oil and water. When oil and water are introduced, the oil separates and forms a heterogeneous solution. This is because water molecules are bound together more tightly than oil molecules, and oil molecules cannot form bonds with them.