Without soap, clothes, dishes, and even your body don't get very clean. But even soap falls short of doing the job in areas with hard water, or water with a high concentration of dissolved minerals, such as calcium and magnesium.
First, a word about how soap works. Before the days of supermarkets and assembly lines, soap was made from fat. Since fat mixes easily with oil, either fat or oil will work to remove greasy stains.
You could, for example, use oil to wash your hands. The problem, then, would be removing the oil since oil doesn't dissolve in water.
In order for a molecule to dissolve in water, it has to have either a positive or a negative charge. This is where the soap molecule is different from other fats. While most fat molecules have no charge at all, the soap molecules are negatively charged on one end.
So while one end mixes with the oil, the negatively-charged end dissolves in the water. The oil itself doesn't dissolve in the water, but the soap keeps oil particles suspended in the water so when you rinse the soap off, the oil goes with it.
But hard water contains an enemy of the soap. Dissolved calcium, such as you get in areas with a lot of limestone, has a strong positive charge. When a negatively-charged soap molecule comes in contact with a positively-charged calcium atom, the two bond together making one molecule with no charge at all.
This soap molecule still attaches itself to oil, but without its negative charge, the other end can no longer dissolve in water. And when the soap-oil mixture can't dissolve, you get that sticky scum in the washing machine or a nasty bathtub ring.