How can you separate salt and water?

Salt water contains two different pure substances, water and sodium chloride. Because these substances are not bonded together they can be separated by evaporation. The water evaporates and leaves salt crystals behind.

Desalinating sea water is commercially and practically accomplished by osmosis, where the sea water is forced through a very fine membrane, as a way to provide drinking water where only sea water is available.

On a small scale:

Distillation:

Heat the salty water and condense the water vapour back into water. This will leave the salt crystals behind.

Distillation is the most common way to get pure water from salt water. Note that more exotic techniques can also be used, such as reverse osmosis. In distillation, the water is boiled, and the water vapor is collected. The vapor is condensed to produce fresh water, whereas the salt is left behind in the boiling vessel.

In reverse osmosis, the salt water is pumped through a semipermeable membrane, which only allows the water to pass through, not the salt. Pure water crosses the membrane, whereas the salt impurities are left behind. Note that osmosis normally operates in the opposite direction, and thus this process must be forced with tremendous pressures, requiring a great deal of energy.
Usually destillation or filtration.