With apologies to Soundgarden, our cars aren't burning dinosaur bones.
Instead, most scientists think oil started out as plankton and other tiny ocean critters, specifically their lipids—tough, stringy molecules that bacteria want to eat about as much as you enjoy dining on gristle or tendons. The idea is that, unlike the rest of the biologic material, lipids don't get gobbled up by bacteria, instead falling out to the bottom of the ocean, where they're covered by millions of years of sediment and eventually become oil. One researcher told LiveScience that some petroleum molecules actually resemble lipids found in cell membranes.
Interestingly, there's a small faction of researchers who say petroleum isn't the fossil fuel everybody thinks. This theory—that the carbon precursor of oil has nothing to do with decomposing organisms, has existed deep within the Earth probably since the planet formed and seeps upward through the mantle—was popular in Soviet Russia, but doesn't match up with what we know about the composition of petroleum and where deposits are likely to be found. That said, recent research has shown that it's theoretically possible for certain hydrocarbons to be synthesized under conditions found in the Earth's mantle. So the mechanism is realistic, even if there's no evidence that petroleum is really being produced this way.
Image courtesy Flickr user richardmasoner, via CC