There is an important thing that soap does: It makes water wetter. That is, it helps the water to penetrate into all the nooks and crannies of whatever it is we’re washing.
Water molecules stick to each other quite strongly. As a result, a water molecule situated at the surface of a “piece” of water has very strong attractions that are trying to pull it into the rest of the “piece.” Now, the tightest huddling-together formation that any group of particles can achieve is to gather into a spherical shape; a sphere has the smallest possible amount of surface exposed to the outside world. That’s why water forms spherical drops whenever it is free to do so, such as when it is falling as rain.
In two dimensions, that’s why the pioneers “circled the wagons” against the Indians; if they had “squared the wagons,” they would have been exposing more of themselves to the outside.
This inward-pulling force on the surface molecules of a liquid is called surface tension. It arises because the surface molecules are, in a way, different from the molecules in the body of the liquid.
In the body of a liquid, a molecule is pulled upon by attractions to fellow molecules above, below, and all around it, and these pulls cancel each other out. But a molecule right on the surface is pulled upon only from below and all around, but not from above; so there is a net downward pull, uncancelled by any upward pull. This makes the surface molecules adhere more tightly to the water than the other molecules do, and the water behaves as if it had a taut skin on its surface. Small objects can even lie on the surface without sinking through the “skin.” And water bugs can even skate merrily along on the water’s surface.
Enter soap. Soap molecules disrupt the surface tension of water by crowding around the water surface with their water-loving heads in the water and their oil-loving tails sticking out. This disrupts the huddling-together tendency of the water molecules and allows them to pay some attention to, that is, adhere to and wet, other things, including a floating needle.
Because of surface tension, you can rest a steel sewing needle on the surface of water in a bowl. Lower it down carefully with a couple of toothpicks or match sticks.
After you’ve gotten the needle to rest on the water’s surface, sprinkle some powdered laundry detergent near it, but don’t actually bomb it. Detergents are even better than soap at killing surface tension. As soon as some of the detergent dissolves, the needle will plunge precipitously to Davy Jones’s locker.