The ion exchange is integral to the effectiveness of the water softener. The process involves the resin in your water softener’s twin cylinders which is made of tiny polymeric beads that are specially formulated so that they can be charged with certain ions.
Calcium and magnesium are the causes of scale and scum in hard water, they are referred to as ions. The resin acts as a filter so when water passes through it the calcium and magnesium swap places with the sodium.
Sodium salts are highly soluble, unlike calcium and magnesium, so does not cause scale or scum. When all the sodium ions have been exchanged for calcium or magnesium, the resin must be regenerated by recharging it with sodium ions. This is done by flushing the resin with salt solution (brine).