Hard water contains high levels of calcium and magnesium. Water softeners use resin beads to filter out these minerals from the water. Water enters your home and flows through the resin beads in the softening system, removing the hard water minerals from the water. As the water flows through the beads, positively charged sodium ions swap with the calcium and magnesium ions. After several cycles, the calcium and magnesium replace all of the sodium ions in the beads. When this happens, the water softener enters a regeneration cycle in which the beads are soaked in a brine solution. The brine and hard water minerals are then flushed from the tank and the water softening system can continue softening the hard water.