Soap scum is created by the reaction of a water-soluble sodium soap with the minerals in hard water -- calcium and magnesium. The result is a sticky, insoluble calcium soap or magnesium soap, aka "soap scum".
When particles of soap scum form, they turn the water milky white and quickly stick to any solid surface. Clothes turn grey and stiff, the bathtub or shower becomes dirty and rough, and skin feels irritated and sticky.
If you have soft water, you won't get too much (or any) soap scum. If you have hard water, you will get more, sometimes a lot more. Drinking water as it comes directly from a water source (well, spring, river, or lake) is usually "hard" in that it contains a variety of dissolved minerals.
One of the ways that hard water scum can be prevented is by "softening" the water before it is used. Some cities treat drinking water to partly soften it, but home water softeners are often used. Home softeners typically replace the hard water minerals with sodium from table salt (sodium chloride, NaCl), but it is difficult to remove all of the undesirable minerals with any water softening system.