As tap water passes through the softener, calcium and magnesium ions (which would form limescale) are adsorbed onto food-grade beads and replaced with sodium. Periodically, when the resin is coated with ions, the beads are washed with brine (salt water) flushing the hard water ions to drain and replenishing the sodium ready for the next treatment cycle. At the end of the cycle the softener is flushed with fresh water leaving the water wholesome and ready for use. The softener has to occasionally be filled with water softener salt (usually in the form of tablets).