A water softener reduces the dissolved calcium, magnesium, and to some degree manganese and ferrous iron ion concentration in hard water.
These “hardness ions” cause three major kinds of undesired effects. Most visibly, metal ions react with soaps and calcium-sensitive detergents, hindering their ability to lather and forming a precipitate—the familiar “bathtub ring”. Presence of “hardness ions” also inhibits the cleaning effect of detergent formulations.
Second, calcium and magnesium carbonates tend to precipitate out as hard deposits to the surfaces of pipes and heat exchanger surfaces. This is principally caused by thermal decomposition of bi-carbonate ions but also happens to some extent even in the absence of such ions. The resulting build-up of scale can restrict water flow in pipes. In boilers, the deposits act as an insulation that impairs the flow of heat into water, reducing the heating efficiency and allowing the metal boiler components to overheat. In a pressurized system, this can lead to failure of the boiler.
Third, the presence of ions in an electrolyte, in this case, hard water, can also lead to galvanic corrosion, in which one metal will preferentially corrode when in contact with another type of metal, when both are in contact with an electrolyte. However the sodium (or Potassium) ions released during conventional water softening are much more electrolytically active than the Calcium or Magnesium ions that they replace and galvanic corrosion would be expected to be substantially increased by water softening and not decreased. Similarly if any lead plumbing is in use, softened water is likely to be substantially more plumbo-solvent than hard water.