Soft water forms abundant lather with soap. Hard water does not, because it contains compounds of calcium or magnesium. Rain water caught off a clean roof is soft, being almost entirely free from chemical impurities. But it has in it some carbonic acid gas, which though does not make it hard, enables it to dissolve calcium and magnesium easily. This accounts for the hardness of water drawn from deep wells, which is rain water that has penetrated the ground, dissolving chemicals on the way. Hard water can be softened to certain extent by boiling, which deposits some of the dissolved matter on the inside of the vessel; and more thoroughly by treating with chemicals.
Hard water (Wikipedia)
Water softening (Wikipedia)