The "crude oil" pumped out of the ground is a black liquid called petroleum. This liquid contains aliphatic hydrocarbons, or hydrocarbons composed of nothing but hydrogen and carbon. The carbon atoms 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.
So what's the real chemical difference between gasoline, kerosene and diesel? It has to do with their boiling points.