These days oil wells are generally found under the sea and therefore off shore oil wells have to be dug by building platforms at sea. It is also a complex mixture of many hydrocarbon compounds. The process whereby the petroleum is separated into its components along with the separation of impurities is called refining of petroleum. The refining is done by fractional distillation. Each hydrocarbon component with its own boiling point separates out neatly when the petroleum is heated.
Figure below shows how the fractional distillation of petroleum is done.
The volatile components from the oil start evaporating and they are made to pass through a fractionalizing column. As the mixtures of vapours rise, they cool. As they cool, different components condense and are then separated out by collecting funnels. The gradual cooling of the vapours along the tower height means that vapours with higher boiling points condense first. The vapours having lower boiling points are collected at higher levels in the tower.