The chemical elements are: Carbon 83-87 percent, Hydrogen 10-14 percent, Nitrogen 0.1-2 percent, Oxygen 0.1-1.5 percent, sulfur 0.5-6 percent, metals less than 0.1 percent. There is some variation in oil from different fields.
Petroleum is a mixture of a very large number of different hydrocarbons. The alkanes are saturated hydrocarbons. From pentane (C5H12) to octane (C8H18) are used for gasoline(petrol) whilst the ones from nonane (C9H20) to hexadecane (C16H34) are used for kerosene and diesel fuel, from hexadecane up for heavy fuel oil and lubricating oil.
There are also cycloalkanes and aromatic hydrocarbons.
These different molecules are separated at the refinery by fractional distillation.
See the Wikipedia entry for Petroleum for more information.