Crude oil is taken out of the ground as a liquid mix of highly flammable compounds of hydrogen and carbon, called hydrocarbons, together with impurities. It is then processed into many fuel and lubricant products at an oil refinery, including gasoline and diesel fuel.
Gasoline is used with different additives and different octane ratings in different engines. It is very volatile, mixing easily with air to form gas or vapor. The more effectively liquid gasoline is changed into vapor, the more efficiently it burns in the engine, so high volatility is desirable. However, gasoline vapor allowed to mix with air in the open is highly explosive so it can be very dangerous, and gasoline must be handled with care.
If liquid gasoline is heated, it is even more volatile. If it vaporizes in the fuel line, bubbles of vapor can block the flow of fuel and stop the engine. This is called vapor lock.
A typical gasoline is mainly a mixture of paraffins, naphthenes, aromatics, and olefins, together with some other organic compounds and contaminants. Some of these contaminants can cause corrosion, so they must be removed, and there are tight regulations in some countries limiting the allowed proportion of aromatics and olefins in gasoline.