Exchange-traded funds, or ETFs, have grown so fast over the last few years it seems like there isn't a country, industry, or commodity they don't cover. Overall, the concept of an ETF is fairly simple: A fund is created that owns specified assets, then the fund is traded on an exchange like a stock. If the underlying assets go up, you make money.

The details are what's complicated about ETFs. Since ETFs have to own an asset, understanding how that asset is traded is extremely important. Some ETFs are simple. iShares S&P US Preferred Stock (NYSE: PFF) owns preferred shares in companies at the same weighting of the corresponding S&P index. The fund is rebalanced every quarter, and there's no hidden information that may lose you money.

Many ETFs are based on a basket of stocks. The Vanguard Utilities ETF (NYSE: VPU) owns utility stocks and pays a dividend based on their payout. This can be a smart way to invest in a specific industry without having to risk your money on a single stock that may underperform its peers.

But some ETFs own futures contracts. Because most funds don't want 1,000 barrels of oil or a few tons of grain delivered to their front doors, they have to trade those contracts before taking delivery of a good. Understanding how that takes place is important.

What's with the roll?
When you buy an oil, natural gas, or other commodity ETF, what you're really buying is a futures contract of that commodity. You aren't buying physical oil, natural gas, or corn. So, for example, if you own shares of the United States Oil Fund (NYSE: USO), you own a futures contract for oil, to be delivered in the next month. Before that delivery date, the fund must roll its contracts to the following month. This is where the problem arises.

It's all about the roll
If futures contracts were all the same price there wouldn't be any problem, but they aren't. In some markets, later-month contracts have higher prices than near-month contracts.

Take an example: Recently, the April WTI contract, which United States Oil Fund owns, is trading at $104.70. But the May contract was trading for $105.21. At some point during the month, the ETF will switch from the April to the May contract. But if spot prices don't change, the May contract's price will eventually drift down to where the April contract trades now. That would result in the fund losing about half a percentage point of value. If that happens often, you run into something like what's happening with United States Oil Fund now, which is down 5.2% over the last year, despite the fact that spot oil prices are down only 0.6%.

The United States 12 Month Oil Fund (NYSE: USL), run by the same company, also invests in oil, but it owns contracts for the next 12 months. So essentially, when the next month is rolled, it's rolled to 12 months from now. That can mean you lose less from regular rolling -- especially if the futures curve is shaped as it is today, with a decline in the months further out.

Source: CME Group.

This same concept can be applied to natural gas, agriculture products, and other commodities.

Making the roll work for you
The roll doesn't always have to work against you. Treasuries work just the opposite of commodities under current conditions. The yield curve gets higher in out years, meaning as you fall down the yield curve, the value of your bonds increases.

iShares Lehman 7-10 Year Treasury ETF (NYSE: IEF) will roll from a 7-year Treasury with a yield of 1.35% to a 10-year Treasury with a yield of 1.95%. Since bond prices and yields are inversely related, the fund is buying low and selling high.

Foolish bottom line
Understanding how an ETF works is just as important as picking the right asset class to invest in. Some ETFs, like leveraged ETFs, will always lose value given a long enough period of time, and some will lose value depending on the shape of a futures curve. Understanding how these things work -- either for or against you -- is something everyone investing in ETFs should do.

For some good ETF picks, check out our free report, "3 ETFs Set to Soar During the Recovery." The report highlights three ETFs following the emerging market's energy and technology, but you have to click here to find out which ETFs our analysts have picked.