There are a number of ways to remove salts from water:
1. Distillation. The salt water is repeatedly evaporated and condensed in a "reflux" condenser.
At some point, determined by the design, the condensed water in the reflux condenser is tapped
off. If the condenser is sufficiently efficient (that's easy in the case of inorganic salts)
the water is very pure (distilled water).
2. Sequential freezing. Here salty water flows over a rotating drum that is cooled below the
freezing point of water. Some of the salty water freezes out on the drum. Water has a rather
complicated crystal structure that prevents inclusions of most salts in the crystal lattice.
So pure water crystallizes out on the drum. There are a number of mechanical/chemical devices
to rinse off the layer of pure water ice that forms. This category of purification is used
in restaurants and bars. In such establishments you will see that the ice cubes are crystal
clear with no inclusions of air like you observe in home-made ice cubes. In addition to the
salts, dissolved gases are removed from the water. The process is very efficient for water that is not too
3. Reverse osmosis. If one separates salty water and pure water by a membrane that allows
water to pass through it (but not any of the dissolved ions) the natural course of events
is that water from the "pure" water side will diffuse through the membrane to dilute the
salty water. This transport comes to equilibrium when the salt concentration on both sides
of the membrane is the same. This process is called osmosis. In reverse osmosis a high
pressure is applied the salty side of the water separated by the membrane that will allow
water to pass, but not the ions. If the pressure is high enough the water is "squeezed" out
of the salty side into the pure water side. The pressures required are rather high and the
membranes are usually not 100% efficient, so in commercial systems there are some engineering
design problems to make the membrane sufficiently mechanically strong to withstand the
pressure difference across the membrane, and a series of membranes may be required to
improve the overall efficiency.
4. There are certain polymeric filters that exchange H(+1) ions for cationic ions M(+n)
and OH(-1) ions for anionic ions A(-m). These remove the salts for H(+1) and OH(-1). Of
course, here one may need to be concerned about the final pH of the effluent water. I do
not think that this method is widely used.