By boiling, carbon dioxide is driven off and the soluble hydrogen carbonates are converted into insoluble carbonates and could be removed by filtration or decantation.Ca(HCO3)2→CaCO3+H2O+CO2
Calcium carbonate and magnesium carbonate are precipitated leaving the water soft.