Process of fractional distillation
Crude oil is heated to vaporise it into a gas
As the gas rises up the column it cools down
When the hydrocarbons reach a temperature lower than their boiling point they condense into a liquid
The longer chain hydrocarbons condense lower down while the shorter chain hydrocarbons condense at the top