Water softeners remove calcium and magnesium ions from hard water through ion exchange. They can also remove other positively charged ions, including iron, depending on the quality of the resin beads. However, water softeners may not effectively remove ferric iron, which can accumulate on the resin bed and require additional treatment methods.