There are many different kinds of soap in the world and most of them have one major thing in common: They can make bubbles. When you amass a bunch of tiny bubbles together, we call it foam or lather. It doesn't matter if you're talking about bar soap, shampoo, dish soap or laundry detergent -- the same thing happens when you mix any of them with air and water. Understanding why this happens is the key to understanding how soap works.

The simple explanation for why certain soaps foam is that these soaps contain chemicals called foaming agents. Common foaming agents used in consumer products are the chemicals ammonium lauryl sulfate and -- even more common -- sodium dodecyl sulfate (sometimes referred to as sodium laureth sulfate) [sources: Fields, Rosen]. Beyond acting as foaming agents, these ingredients also function as surfactants. A surfactant acts to reduce the surface tension of water, and it can break up oil or sebum on the skin, allowing the dirt to be washed away. To understand exactly how the bubbles form, though, requires a slightly more complicated explanation.

Consider a glass of water. Think of it like a big party where everyone really likes each other. Inside the glass, all of the water molecules are grouped together because they're equally attracted to each other. The molecules at the surface, however, are at the edge of the party. They don't have any molecules above them to hang with, so they hold on tight to the molecules at their sides. The result is surface tension.

Soap molecules are party people, too - but they're not like water molecules, they like to mingle. On one end, they're attracted to water. But the other end is attracted to air and the stuff that makes us dirty like oil, grease and grime. So when you put soap in water, the ends of the soap molecules that are attracted to it latch on right away and the other ends stick straight up in the air. Any soap molecules trapped underneath will fight their way to the surface and eventually you end up with three layers: a layer of soap molecules, a layer of water and another layer of soap molecules pushing themselves away from the main body of water underneath. These three layers form the wall of a bubble [source: Gruner]. When this happens quickly, you end up with a bunch of tiny bubbles, also known as foam.

The different ends of soap molecules are also what make soap so good at cleaning. As you learned earlier, when you mix soap with water, it lowers the surface tension of the water by separating the water molecules, as the soap molecules push up between them. Meanwhile, the other ends of the soap molecules that are attracted to dirt grab on to it. As multiple soap molecules attach themselves to the same piece of dirt, they eventually break it down into tiny particles, which then can easily be washed away [source: Stenesh].

To learn more about soap and other skin care products, look over the links on the next page.