Softeners are common and use ion exchange by utilising a resin made of porous beads. The resin is initially charged by passing a brine solution through it, which leaves the resin rich in sodium ions. The water is then pumped through the resin bed and ion exchange occurs. Harmful, scale-forming calcium and magnesium ions in the water are substituted by the sodium ions from the resin, leaving the flowing water rich in sodium salts which do not form scale. The resin needs to be recharged with brine periodically.
Softeners are relatively cheap to operate and can produce treated water reliably for many years.