Residential water softener installation works through a process called ion exchange. As water passes through the system, calcium and magnesium are removed and replaced with sodium ions. https://japlumbinginc.ca/how-the-installation-of-a-residential-water-softener-reduces-plumbing-scale/