Hard water is caused by dissolved minerals, mainly calcium and magnesium, that are picked up as water passes through soil and rock. It can interfere with cleaning tasks and leave films on fixtures. Permanent hardness cannot be removed by boiling and is caused by calcium and magnesium sulfates. While hard water does not pose health risks, it can cause nuisance problems like scale buildup and poor soap performance. Water becomes hard when it dissolves calcium and magnesium from geologic formations like limestone and dolomite during passage through the ground.