How does fractional distillation work?
The oil is heated until most of it has turned to gas which enter a fractionating column.
The longer hydrocarbons have higher boiling points. They condense back into liquids and drain out the column. End up with oil mixture in different fractions