Desalination is the process used to convert salt water into pure water.  Seawater is an example of a mixture called a solution. A solution is any liquid called a solvent that contains dissolved compounds which are called solutes. The purification of seawater involves removing the solutes from the solution.

Desalination can be achieved by heating seawater to convert the water into the gas state and then condensing this steam back to the liquid state. This process is called distillation and requires such a tremendous amount of energy it is not practical on a large scale. The following is a picture of a laboratory distillation apparatus. 

The poem of The Ancient Mariner has much basis in fact.  Seawater contains 3.5% salt compared to our blood which contains only about 0.9% salt. If a cell were placed in seawater, water would flow out of the cell, through the cell membrane, into the seawater. This process is called osmosis and is the natural tendency of the water to try to equalize the two concentrations of salt on both sides of a semi-permeable  membrane. The pores of some semi-permeable membranes are too small to allow hydrated ions to pass through but are large enough to allow the smaller molecules of water to pass. If two solutions are separated by a semi-permeable membrane, water will flow into the more concentrated solution and that volume will increase. This higher level of liquid causes a back pressure which ultimately stops the flow and this pressure is called the osmotic pressure.

The most widely used method of desalination on a large scale involves reverse osmosis. If pure water and salt water are placed on both sides of a semi-permeable membrane, water will flow towards the salt waterside. If a high pressure (higher than the osmotic pressure) is applied to the salt water side of the semi-permeable membrane, the water will flow in the opposite direction and pure water will be obtained.