Why water can't mix with oil or cooking oil?
The basic answer is that water molecules attract each other and so clump together forcing almost all of the oil out of the clump.

The attraction exists because water is a polar molecule.  That is, it has a positive end and an negative end.  Thus the molecules tend to clump together just as a bag of small magnets tend to clump together.  Oils, on the other hand, are not polar.

This principle can be expanded.  In general polar materials tend not to dissolve in oils or, if they are liquids, dissolve in them.  The rule in chemistry is "like dissolves like".