The process is fractional distillation: the separation of a mixture using heat. The crude oil is heated and the mixture will evaporate. The mixture will then rise up the column and cool as it rises as the tower is hot at the bottom and cooler at the top -there is a temperature gradient. Because the different fractions have different boiling points, they will condense at different heights in the tower and will be collected at their relative heights.