This results in the formation of glycerol and a salt - soap. \(Fat/Oil + Sodium\, Hydroxide \rightarrow Soap + Glycerol\) Fats and oils are esters made from glycerol and long chain fatty acids.
To prevent the oil and water from separating (and thus the food spoiling), soap-like chemicals called ... on the molecule. One emulsifier that is commonly listed as a food additive is E471.