Solution:
$\text{HINT: Ions in the water are exchanged for other ions fixed to the resin.}$
$\text{Explanation:}$
$\text{The process of treating the permanent hardness of water using synthetic}$ $\text{resins is based on the exchange of cations (e.g., }\text{Na}^+, \text{Ca}^{2+}, \text{Mg}^{2+}\text{ etc)}$ $\text{and anions (e.g., }\text{Cl}^-, \text{SO}_4^{2-}, \text{HCO}_3^-\text{ etc) present in water by }\text{H}^+\text{ and}$ $\text{OH}^-\text{ ions respectively.}$
$\text{Synthetic resins are of two types: 1) Cation exchange resins 2) Anion}$ $\text{exchange resins}$
$\text{Cation exchange resins are large organic molecules that contain the}$ $\text{- }\text{SO}_3\text{H group. The resin is firstly changed to RNa (from }\text{RSO}_3\text{H) by}$ $\text{treating it with }\text{NaCl}.\text{ This resin then exchanges }\text{Na}^+\text{ ions with }\text{Ca}^{2+}\text{ and}$ $\text{Mg}^{2+}\text{ ions, thereby making the water soft.}$
$2\text{RNa}_{\text{(s)}} + \text{M}^{2+}_{\text{(aq)}} \rightarrow \text{R}_2\text{M}_{\text{(s)}} + 2\text{Na}^{+}_{\text{(aq)}}$
$\text{There are cation exchange resins in }\text{H}^+\text{ form. The resins exchange }\text{H}^+\text{ ions}$ $\text{for }\text{Na}^+, \text{Ca}^{2+},\text{ and }\text{Mg}^{2+}\text{ ions.}$
$2\text{RH}_{\text{(s)}} + \text{M}^{2+}_{\text{(aq)}} \rightleftharpoons \text{MR}_{2\text{(s)}} + 2\text{H}^{+}_{\text{(aq)}}$
$\text{Anion exchange resins exchange }\text{OH}^-\text{ions for anions like }\text{Cl}^-,\text{HCO}_3^-,\text{ and}$ $\text{SO}_4^{2-}\text{ present in water.}$
$\text{RNH}_{2\text{(r)}} + \text{H}_2\text{O}_{\text{(l)}} \rightleftharpoons \text{RNH}_3^{+}\text{OH}_{\text{(r)}}^-$
$\downarrow + \text{X}_{\text{(aq)}}^-$
$\text{RNH}_3^{+}\text{X}_{\text{(r)}}^- + \text{OH}_{\text{(aq)}}^-$
$\text{During the complete process, water first passes through the cation exchange}$ $\text{process. The water obtained after this process is free from mineral cations}$ $\text{and is acidic in nature.}$
$\text{This acidic water is then passed through the anion exchange process where}$ $\text{OH}^-\text{ ions neutralize the }\text{H}^+\text{ ions and de-ionize the water obtained.}$