Salt-based water softeners use ion-exchange resin to remove calcium and magnesium from water, providing softened water for residential or commercial use.