Fractional distillation separates the different molecules in a crude oil mixture because of their differences in boiling points.
A fractional distillation column is heated at the bottom and gets progressively colder as you move up the column. The crude oil is heated so that the liquid evaporates to become gas. Molecules which are bigger have higher boiling points so condense back to liquid nearer the bottom of the column whereas smaller molecules have lower boiling points so travel further up the column before condensing.