Gasoline is made from crude oil. The crude oil pumped out of the ground is a black liquid called petroleum. This liquid contains hydrocarbons, and the carbon atoms in crude oil link together in chains of different lengths.
It turns out that hydrocarbon molecules of different lengths have different properties and behaviors. For example, a chain with just one carbon atom in it (CH4) is the lightest chain, known as methane. Methane is a gas so light that it floats like helium. As the chains get longer, they get heavier.
The first four chains -- CH4 (methane), C2H6 (ethane), C3H8 (propane) and C4H10 (butane) -- are all gases, and they boil at -161, -88, -46 and -1 degrees F, respectively (-107, -67, -43 and -18 degrees C). The chains up through C18H32 or so are all liquids at room temperature, and the chains above C19 are all solids at room temperature.
The different chain lengths have progressively higher boiling points, so they can be separated out by distillation. This is what happens in an oil refinery -- crude oil is heated and the different chains are pulled out by their vaporization temperatures. (See How Oil Refining Works for details.)
The chains in the C5, C6 and C7 range are all very light, easily vaporized, clear liquids called naphthas. They are used as solvents -- dry cleaning fluids can be made from these liquids, as well as paint solvents and other quick-drying products.
The chains from C7H16 through C11H24 are blended together and used for gasoline. All of them vaporize at temperatures below the boiling point of water. That's why if you spill gasoline on the ground it evaporates very quickly.
Next come the lubricating oils. These oils no longer vaporize in any way at normal temperatures. For example, engine oil can run all day at 250 degrees F (121 degrees C) without vaporizing at all. Oils go from very light (like 3-in-1 oil) through various thicknesses of motor oil through very thick gear oils and then semi-solid greases. Vasoline falls in there as well.
Chains above the C20 range form solids, starting with paraffin wax, then tar and finally asphaltic bitumen, which used to make asphalt roads.
All of these different substances come from crude oil. The only difference is the length of the carbon chains!