Hard water contains dissolved calcium and magnesium ions. Commonly referred to as "hardness minerals," dissolved calcium and magnesium can cause numerous problems when present in a water supply.
Whether it's from a well or a municipal water utility, water usually contains these troublesome elements.
As water falls from the sky in its various forms, it absorbs carbon dioxide in the air and becomes slightly acidic.
Water in this weak acid state reaches and enters the ground. Since it is acidic, it absorbs calcium and magnesium, among other things, from the layers of rock through which it passes.