Soap is amphiphilic. It likes it both ways. More specifically, a soap molecule has a head that LOVES water, can't get enough of it; and a tail that will do anything in its power to flee from the first drop of rain. Soap cleans, and is slippery, because its head and tail can't get away from each other, so they cause oil (and dirt) to emulsify with water, which we can then wash away.
Soap HEAD - ionic, polar, intense, LOVES water
The head of a soap molecule has an intense ionic polar charge and here it differs from synthetic detergents (such as those in many shampoos). Synthetic detergents aren't ionic; they'll either be cationic, nonionic, or anionic. The head is hydrophilic, which means it LOVES water.
Soap TAIL - not polar, HATES water, LOVES oil
The tail of a soap molecule is made up of a long chain of hydrocarbons. The tail is hydrophobic, and attracted to lipids (oils).
A lot happens in a lather
What happens in a lather stays in a lather. That could be lazy science. After all, a lot of complex stuff goes on, as the soap molecule's head and tail struggle against (and perhaps a bit with) each other, sliding to and from oil and water, and bringing both down into a mix of suds that you can rinse right off.
Hard water and lather (London taps!)
Have you ever noticed that it's harder to work up a froth with soap in London rather than, say, Edinburgh? This is because London water is 'hard' - which means it contains ions from Calcium, Magnesium, Iron and so on. These displace the Sodium ions in soap, making it harder to work up a lather. The soap will still work just fine - even London water isn't that hard.