Distillation  is a method of separation a liquid mixture of substances on the basis of different boiling points:

By evaporation followed by condensation the the components of the mixture are separated.
Distillation of salt water results in the pure substance water.
Distillation of petroleum does not result in a pure substance but in another mixture.