Oil and vinegar do not mix because lipids are insoluble in water. Vinegar is mostly water, so it does not form a solution with vegetable oil. The primary reason that oils and water do not mix is that their individual molecules are strongly attracted to others of their kind. This means that oil molecules attract other oil molecules, water molecules attract other water molecules, and both exclude each other.
The reasons that molecules bond with or repel other molecules relates to the polarity of the molecules. Some molecules have positive charges, some have negative charges, and some have both. When the charges of two molecules are the same, they repel each other. By contrast, when the charges are opposite from each other, they exhibit attraction and form bonds.
While oils and water do not mix to form solutions, some chemicals can form solutions with both types of molecules. Soap is an example of a substance that bonds with both water and lipids. This means that when soap is added to a container that holds both oil and water, the soap bonds with both substances, making a homogeneous mixture. However, the new mixture is not a solution; it is called an emulsion and represents a different type of chemical mixture. This is why soap works well for cleaning greasy dishes.