Oil and water don’t normally mix. When you get grease or oil on your hands, it is not easy to wash them off with water alone.
This is because water molecules bind to themselves much more strongly than they do to the oil. The water molecules stick together, and leave the oil molecules behind. This is the same reason water and air don’t mix. Water and sand don’t mix because the sand molecules stick to one another better than they stick to water.
The surface between water and oil, or between water and air, is made up of water molecules that pull on one another. We call this pulling surface tension. If we can make the water molecules pull on each other a little less, we can relieve some of that surface tension. This would allow the water to spread out more if you spilled some, instead of beading up into little droplets. We say that water with less surface tension is wetter than normal water, because it can more easily make things wet.
Soap is a special kind of molecule. It has one end that is strongly attracted to water. But the rest of the molecule is an oil. Oils are long chains of carbon atoms with hydrogen atoms attached to them. There might be anywhere from 10 to 30 carbon atoms in the long chain.
The end of the soap molecule that is attracted to water sticks into the water at the surface. The rest of the long chain sticks out of the water, because the water doesn’t stick to the oil chains.
Oil molecules don’t pull on one another as strongly as water molecules do. The surface of the water now has a film of oil molecules instead of water molecules. The surface tension is now much lower than it was, and the water doesn’t bead up. It can reach into all the crevices of your hands, or in between the fibers of clothes in the wash.
The soap forms the surface between the water and the air. But it also forms the surface between the water and any oil or grease on your hands. The long chains stick into the oil, and the water loving end stick into the water. As you scrub your hands together, you flatten any droplets of oil or water trapped between them. This lets more soap molecules form a surface between the oil and the water. When the water or the oil tries to form round droplets again, the bigger surface wrinkles, and forms many tiny droplets instead of big ones.
The droplets don’t get back together to form big droplets again, because there is a soap film between them. So as you scrub, the droplets get smaller and smaller. The tiny droplets, surrounded by soap molecules, no longer stick to your hands better than they do to the water. The water can now easily wash the tiny soap-coated oil droplets away.