Crude oil is a mixture removed from the earth. This mixture is a combination of different liquids and minerals all with different boiling points.
Crude oil is heated and the petrol in the mixture is evaporated. As the gas rises it is cooled back into a liquid and captured in a new container.