The presence of magnesium and calcium bi-carbonates in water makes it temporarily hard. In this case, the hardness in water can be removed to a large extent by boiling the water.
When we boil water the soluble salts of Mg(HCO3)2 and Ca(HCO3)2 are converted to Mg(OH)2 and CaCO3 which are insoluble and hence gets precipitated and are removed. After filtration, the water we get is soft water.