The many hydrocarbons in crude oil are separated into fractions by fractional distillation. Each fraction contains molecules with a similar number of carbon atoms, and so a similar boiling point.
The crude oil is heated until it evaporates. The vapour enters a column that is hot at the bottom and cooler towards the top. As the vapours rise, each one condenses when it reaches the level where the temperature is below its boiling point. Large molecules have high boiling points, so they condense near the bottom. Small molecules have low boiling points, so they travel further up and condense near the top. The separation depends on evaporation and condensation.
The fractions are processed to produce fuels and feedstock for the petrochemical industry. Fuels from crude oil include petrol, diesel oil, kerosene, heavy fuel oil and liquefied petroleum gases. The petrochemical industry makes useful materials such as solvents, lubricants, polymers and detergents.
Carbon atoms can join to form families of similar compounds, which is why there is such a vast array of natural and synthetic carbon compounds.