by heating the crude oil. then when it cools down to a certain lvl, the vapors will condensate and turn back into liquid form. so different kind of petrol will condensate at different temp.
Using HEAT to let petrol escape under different temperatures.
That is the job they do in oil refinaries. Heating,cracking, distillation and many more process.
By distillation on a grand scale.
a refinery is built for this.