As with any commodity you can preorder a set amount at a set price in advance. Say I promise to buy 100,000 barrels of oil from you in March 2011 at $75/barrel. That promise is a commodity on both sides, because you are also committed to sell 100,000 barrels of oil at $75 at that time. So if I find somebody, or a syndicate of someones, who feels sure oil will be $80 in March 2011, I can sell them my promise for instant cash. If oil is $80 / barrel then the guy who buys it off me will have saved $500,000 on the price of 100,000 barrels. If oil is $60 / barrel he lost a lot of money.
You might sell your end of the contract to people who will feel sure oil will be $40 / barrel. Or if somebody thinks oil will be <$75 / barrel at that time, they may sell you a guarantee against losses if oil is >$75 / barrel. They will accept the risk for the $$$ you pay as the price of the guarantee.
Where it gets messy is that oil production is really a cartel, with the producers colluding to keep prices profitable. Also, the producers don't mind putting money behind wheeler-dealers who then speculate on oil prices. Also, since the product takes weeks to ship globally, the amount of oil actually available for consumption, the amount of oil being pumped, the amount of oil being refined, and the amount being traded, are all separate entities. There are collective buyers who trade in massive quantities of oil and the promise of massive quantities of oil for billions of $ every day.
The core joke of Hitchhiker's Guide to the Galaxy is that of course no civilization would develop personal computers with instant remote database recovery, and then waste this technology to find good drinks.
Steve Jobs has ruined this joke.