Water softening is the removal of hardness from the water, which is caused mainly due to the presence of calcium and magnesium ions. Hard water is formed when water percolates through deposits of limestone and chalk, which are largely made up of calcium and magnesium carbonates. Hard drinking water may have moderate health benefits, but can pose serious problems in industrial settings, where water hardness is monitored to avoid costly breakdowns in boilers, cooling towers, pipelines, pumps and other equipment that holds water.