Hard water occurs when water picks up dissolved calcium and magnesium as it moves through soil and rock. A water softener removes these minerals through a process called ion exchange. This helps reduce scale buildup in plumbing, fixtures, and water-using appliances.