Soap is an ancient concept that can be traced back to 2,800 BCE in Babylon, and
the basic principle of mixing animal or vegetable fat with an acid has remained the same from the very beginning. The chemical reaction that occurs when these are mixed is called saponification.
Soap doesn’t actually kill any organism living on your hands, but it is so effective at removing the microbes that it doesn’t need to. It’s action comes from the way the soap molecules interact with the dirt on your skin. Water alone doesn’t do much to help clean because water and fat don’t mix and will separate instead. This is because dirt is filled with lipophillic (attracted to fats) molecules that are drawn to fat and repel water. This means the water is unable to attach itself to the dirt properly and wash it away.
A soap molecule gets around this because it has two ends. One end is hydrophilic (attracted to water) and the other is lipophillic. The lipophilic end attaches itself to the fat on your hands and the hydrophilic end surrounds the fat in a water layer that prevents it from repelling surrounding water molecules.
Both ends of the molecule are satisfied when the drops of oil are suspended inside a layer of water molecules. As you scrub your hands together when you rinse, the drops of water holding the fat are easily washed away.