Water softeners work using a principle called ion exchange.
Here magnesium and calcium ions in the water are replaced with sodium ions from the sodium chloride in the water softener. The magnesium and calcium ions prefer to be joined to the chloride ions in the water softener and the sodium ions prefer to end up in the water. The removal of magnesium and chloride stops limescale forming on taps and the insides of kettles, but the water from a water softener has more sodium in it than normal and this could lead to high blood pressure. This is a stand-alone question which will eventually become integrated into the linked database.