Water is the 'universal solvent', almost all substances dissolve in it. Oil is the one substance that does not dissolve in water. However hard you try you will always see that if you try to mix the two, you will notice that the oil layer lies about the water.
Water is a polar molecule as compared to oil
The answer behind this puzzle is that oil does not dissolve in water because of the way molecules of each of these substances interact with each other. A basic principle of chemistry is one molecule can easily dissolve in another having similar characteristics.
The polarity of water
Water is a polar molecule. This means this is a molecule that likes to take sides. One side of the molecule is positively charged, while the other is negatively charged. The two atoms of oxygen cling to each other with the single hydrogen atom on the other side.
Oil on the other hand is made of carbon atoms bonded to hydrogen atoms forming hydrocarbon chains, this makes them non-polar. What this means is that oil molecules are attracted to each other more than water molecules.
Oil molecules are attracted to each other more than water molecules.
There is a particular saying in chemistry called 'Like dissolves like' which basically means polar substances will only dissolve polar substances and so is the same for non-polar substances.
Size does matter
Did you know that water molecules are much smaller than other molecules? So a number of water molecules have to break their hydrogen bonds to accommodate oil molecules, which is another reason why oil doesn't easily mix with water.