Oil does not dissolve in water because of the differences in their molecular structures and polarities. Water is a polar molecule, which means it has a positive and negative end due to the uneven distribution of electrons. This polarity allows water molecules to form hydrogen bonds with each other, creating a cohesive and stable structure.
On the other hand, oil is composed of non-polar molecules, which do not have a positive or negative end. As a result, oil molecules cannot form hydrogen bonds with water molecules. Instead, when oil is mixed with water, the water molecules are attracted to each other more than to the oil molecules. This leads to the separation of the two substances, with oil floating on top of the water.
This principle can be summed up with the phrase “like dissolves like.” Polar substances, like water, will dissolve other polar substances, while non-polar substances, like oil, will not mix with polar substances. Therefore, when you try to mix oil and water, they remain distinct and separate.