Hardness in water is determined by the content of calcium and magnesium salts. These salts are formed when calcium and magnesium combine with bicarbonates, sulfates, chlorides, and nitrates.
The standard measurement of hardness in water is "grains per gallon," with a grain representing 17.1 parts per million. Grains per gallon is usually reported "as calcium carbonate" (CaCO3) to facilitate comparison with other constituents of the water.
There are a variety of definitions of where "hard" water begins, but there is general agreement that water of 7 grains per gallon or more is hard enough that things would be improved by a water softener.
The EPA does not take a position with respect to hardness or softness of public water supplies. There is no MCL for hardness.
At a more technical level, hardness is divided into Temporary and Permanent hardness.
Temporary hardness is hardness that contains carbonates and Permanent hardness is hardness that contains non-carbonates.
Temporary hardness salts are
CaCO3--Calcium Carbonate--also known as limestone. It causes alkalinity. It is rarer than Calcium Bicarbonate, which forms when water containing CO2 comes in contact with limestone. It also causes alkalinity. When heated, calcium bicarbonate reverts back to calcium carbonate, thus forming scale. (Hence, scale formation which is common in hot water heaters and boilers.)
Magnesium Carbonate. Also known as magnesite, it has properties similar to calcium carbonate.
Magnesium Bicarbonate. Similar in its properties to Calcium Bicarbonate.
Permanent hardness salts are
Calcium Sulfate, also known as gypsum. It precipitates and forms scale in boilers.
Calcium Chloride (CaCl2) which reacts in boiler water to form a water low in pH.
Magnesium Sulfate, commonly known as Epsom Salts, may have a laxative effect if present in sufficient quantities.
Magnesium Chloride is similar in properties to calcium chloride.
Sodium salts are also common in water, but they are considered harmless in reasonable amounts.
Treatment: The standard treatment for hardness is a water softener. Its practical limits are up to about 100 grains per gallon hardness. It is less effective if large amounts of sodium are present
Reverse Osmosis also removes hardness, but hardness may form scale on RO membranes.
Municipalities often treat excessive hardness with a process called "lime softening" which can lower but not remove hardness completely.
Hardness is also treated by alternatives to conventional softening. These include sequestering the hardness with polyphosphates and the use of electronic or media based treatments that do not remove hardness but condition it to be less objectionable.