Soap and detergent molecules have a hydrophilic (water-attracting) head and a hydrophobic (oil/ grease-attracting) tail. In water, these molecules aggregate into spherical structures called micelles, where the hydrophobic tails are oriented inward, away from the water, and the hydrophilic heads are oriented outward, in contact with the water. Oily or greasy dirt particles get trapped within the hydrophobic core of these micelles and are thus suspended in water, allowing them to be washed away.