Soaps are mixtures of sodium or potassium salts of fatty acids which can be derived from oils or fats by reacting them with an alkali. Nearly all compounds fall into one of two categories: hydrophilic ('water-loving') and hydrophobic ('water-hating'). Water and anything that will mix with water are hydrophilic. Oil and anything that will mix with oil are hydrophobic. When water and oil are mixed they separate. Hydrophilic and hydrophobic compounds just don't mix. The cleansing action of soap is determined by its polar and non-polar structures in conjunction with an application of solubility principles. The long hydrocarbon chain is non-polar and hydrophobic (repelled by water). The "salt" end of the soap molecule is ionic and hydrophilic (water soluble).