Crude oil is a mix of hydrocarbons, or molecules made up of carbon and hydrogen linked together. The simplest and lightest gas, methane, has one carbon and four hydrogen atoms. Propane, a bit heavier, has 3 carbons and 8 hydrogens; the familiar gasoline, or octane, has 8 carbons and 18 hydrogens. The number of carbon and hydrogen atoms can be found to be linked together into quite long chains, and these and make heavier substances. So hydrocarbons can run in range from from gases to liquids to solids.
To process the crude oil, it is first moved though hot furnaces and the various gases are led to cooling towers, where fractional distillation occurs, which separates gases and liquids.
However, some of the very long molecules of hydrogen and carbon are solids, and are processed differently. These can be transformed into very valuable octane by "cracking" them apart into the correct octane molecule of 8 and 18. That's why the larger (longer, really) hydrocarbons are broken apart -- there's little economic value in cracking shorter chained molecules into even smaller ones and only producing gases, when you can break down the long ones and produce gasoline. See more at the link: