I sell ultrapure water systems for a living. I do industrial scale size systems for hospitals, pharma, food and beverage, manufacturing, etc. Some of you have good information. Some of you are completely wrong.
Water softeners take hardness, Calcium and Magnesium plus a little iron, out of the water. This not by a chemical process. It is by ion exchange. Your softener resin tank has a bunch of really small resin beads in it. Those beads will attract the Calcium and Magnesium to them. Base on the hardness of your water and your usage, you set the unit to regenerate every so often. During regeneration your resin is flushed with salt brine. Salt is NaCl, Sodium Chloride. The bond between the Chloride and the hardness is stronger than the bond with the Sodium. The hardness goes down the drain during the regeneration and the Sodium sticks to the resin. Once the unit goes back into service, the hard water passes over the resin. The hardness trades places with the Sodium ions and the sodium goes into the water stream. That is why soft water tastes funny.
A carbon filter removes Chlorine through the process of adsorption. You need to have a large enough carbon filter based on your rate of flow (gallons per minute) to allow enough time for the carbon to adsorb the Chlorine.
A water softener and carbon are required for an RO (Reverse Osmosis). The hardness in water will plug your membranes. Again, the carbon removes Chlorine, an oxidizer. Failing to do so will cause your RO membranes to degrade at a rapid pace.
RO machines take out 96% - 99% of all ions in the water. They are what is used to remove Nitrates. If you have Copper pipes, a whole house RO is not a good idea. The water is so clean it will begin to scavenge ions from any source possible, primarily your pipes, ruining them over time. PEX or poly tubing with plastic fittings is preferred.
Remember, RO water does not have any Chlorine in it so you can start to get bio-growth in stagnant water.