A little more detail: There are two main types of contract used for locking in future prices: The futures contract, and the
forward contract.
A straight forward contract specifies an obligation to buy (for the party said to be long) and an obligation to sell (for the party said to short) a certain amount of some commodity at a certain price at a certain future time. Forward contracts are usually custom-made for each case, and offers more flexibility than futures contracts, but are usually less liquid. The counterparty in forward contracts are whoever you go into the contract with, subtracting a risk of default from the value of the contract. This risk is deemed counterparty risk, and may be substantial.
A futures contract is a special type of forward contract that is "marked to market". When you purchase or sell a futures contract, you deposit money as margin in an account with your broker. Your counter-party does the same.
At the close of each trading day, the price is compared to the last price marked - either the purchase price (for the first day), or the previous closing price. If the price has gone up, the amount of money that the price of the contract has changed is transferred from the short to the long party, making sure the long party could re-open another contract at the same price if the short default on the contract. If the price goes down, the money flows the other way. This result in there never being any financial incentive to default on a futures contract, which again minimize the counterparty risk, and makes it easy to take profit before the actual delivery of the underlying.
Futures contracts usually deal in commodities or currencies, are usually standardized in terms of contract size, delivery dates, and delivery locations, and usually trade on a commodities exchange. As a part of the exchange setup, the counterparty for all trades are usually set to a clearing house, more or less eliminating counterparty risk (no US clearing house has to date defaulted on an obligation.)
The result of the above is that it is much less inherent risk associated with trading in futures contracts than in forward contracts, and future contracts are thus much more liquid (easier to trade for money) than forward contracts - in fact, every single contract is effectively traded for money every single day.
It is fairly uncommon for futures contracts to actually go to delivery of the underlying - most open interest is closed by taking offsetting positions in the market (ie, if somebody is long, they aquire a short postition to be neutral.)
Futures contracts used to be used mostly for commodities, but the largest markets for them has now become financial futures - interest rate and currency futures being the major of these.