|MadSci Network: Microbiology|
I also see that this question has been answered before (see: htt p://www.madsci.org/posts/archives/mar2000/954424214.Ch.r.html, but I feel that answer was incomplete.
Soap molecules have two different ends. One end (the "ionic" or "electrically-charged" end) attracts water, while the other end (the "hydrocarbon" or "fatty" end attracts fat, oil, or dirt. This makes the fat, oil, or dirt dissolve in the water, and allows it to be washed away. If you have "hard" water, (which is water with a lot of dissolved minerals such as calcium or iron) the dissolved minerals attach to the ionic end of the soap molecules and prevent them from dissolving in water. The result is a white or yellowish residue called "soap scum". This soap scum may contain dirt in addition to the soap molecules and minerals. If you have soft water, then you won't get as much soap scum, and you will also need to use less soap in order to get clean. This is because there are less dissolved minerals to block the soap molecules. Sometimes, bacteria or mold can grow in the soap scum and make it smell bad, or turn other colors like green or black.
Try the links in the MadSci Library for more information on Microbiology.