Concept:
Ion exchange is a reversible chemical process where undesirable ions in a liquid are replaced by more desirable ions through a solid medium (resin). In water treatment, this is specifically used to remove the minerals that cause water to be "hard".
Step 1:
Hardness in natural water is primarily caused by the presence of dissolved calcium ($Ca^{2+}$) and magnesium ($Mg^{2+}$) salts.
Step 2:
To soften the water, the concentration of these specific divalent cations ($Ca^{2+}$ and $Mg^{2+}$) must be effectively reduced or removed.
Step 3:
The hard water is passed through a bed containing ion-exchange resins that are pre-loaded with monovalent ions like sodium ($Na^{+}$) or hydrogen ($H^{+}$).
Step 4:
As the hard water flows through the resin, the resin releases its $Na^{+}$ or $H^{+}$ ions into the water and captures the $Ca^{2+}$ and $Mg^{2+}$ ions from the water in their place.
Step 5:
The resulting treated water is "soft" because it now contains sodium or hydrogen ions instead of the scale-forming calcium and magnesium ions.