Usually, the asset for which a futures contract is drawn up is a commodity, such as gold, corn, etc. If the buyer thinks the price of corn will be higher in the future than it is today, he or she will buy a futures contract for corn. The seller, on the other hand, disagrees with that assessment. Note that the buyer and seller necessarily have to have differing opinions on the future price of a specific asset for a futures contract to take place. Sometimes, futures contracts are for intangible items, such as interest rates or stock indexes. In a way, however, almost all futures contracts deal with intangible items, as the buyer rarely ever receives the asset in the contract he purchased. Instead, he or she will generally re-sell the contract when it is believed the price of the asset has hit a peak.
Because futures contracts deal with differing opinions of two parties, each party must put up a specified amount of cash, known as the margin, at the time the contract is signed. The margin is cash that continually exchanges hands on a daily basis based on the current price of an asset. For example, if a buyer purchases a futures contract for gold, both he and the seller will put up cash, controlled by an intermediary, to exchange hands. If the price of gold goes up after one day, some of the money from the seller transfers to the buyer's account. If the price of gold decreases the following day, money is then transferred back into the account of the seller.
Sometimes, when a futures price fluctuates greatly, the margin will evaporate. If a seller puts up $50,000, for example, and the price of gold decreases so much that that entire margin goes into the account of the buyer, the seller must replenish the margin. At that time, he or she will be asked to put up an additional $50,000. In some ways, this is much like making an entirely new contract. Many times, the seller will get out of the contract at this point. For those with plenty of funds, however, it is best to stay in contracts even after the margin has disappeared. At that time, the price of the asset has decreased so much that it is bound to regress to the mean. If the seller can wait it out, the price of the asset should increase. Of course, every case is different.
Most futures contracts are cash-settled, meaning instead of delivering the actual asset when the contract is up, the buyer or seller provides cash. While this is usually taken care of via the margin, that is not always the case. In some contracts, however, the buyer actually receives the asset.
If a buyer or seller wants to get out of a futures contract, the way it can be done is a bit strange. Since futures are contracts, you cannot technically leave one without paying up. However, if a buyer or seller buys a futures contract on the opposite side of their current one, they can effectively "cancel out" the first contract. For example, if a buyer purchases $20,000 of corn via a futures contract but wants to get out of the contract, he can then become a seller of corn for the same $20,000 amount. If the buyer lost any money prior to selling, that amount is all he or she will lose. In this way, futures contracts are not as risky as they might appear.
One of the most common types of people to purchase futures contracts are hedgers. These are people who own a certain asset and want to "hedge their bet" so as to minimize downside risk. Farmers, for example, will sell futures contracts on their own crops so they are guaranteed a certain profit. If a crop is poor in a given year, the farmer will not lose lots of money because they have sold futures contracts. Note that this also limits the farmer's upside.