Water is hydrophillic ( mixes with water easily ) and oils or fats are generally hydrophobic. It may seem obvious but the idea of water being hydrophillic gives you an idea of why, like dissolves like and water-like substances tend to be hydrophillic because they bond and interact with water. For example, salts will dissolve in water because theyr ionic and the nature of water as dipole/solvent. So substances with electronically charged groups, polar/high dipole moments tend to be more hydrophillic.
On the other hand, oils and covalently bonded long chain hydrocarbons are bulky and lack the charge separation that makes them easily soluble in aqueous solutions. They are hydrophobic and separate out from water, forming an oily layer.
Some larger molecules exhibit both these properties, perhaps having charged electronegative groups on one end and a long branch of alkanes at the other. This is has a tendency for one side of the molecule to align to favour the solvent.
Surfactants are compunds that alter the properties of the solvent in favour of its opposite property, by virtue of having a group or region that exhibits both properties. They form "bubble-like" structures around non soluble substances which i think is related to amphiphiles, though I am not very familiar with it.