In order to provide exposure to prices of resources that don't lend themselves to physical storage, many ETFs invest in futures contracts written on the related asset. A futures contract is an agreement to buy or sell a commodity at a certain date for a predetermined price, so its value generally moves along with spot prices.
In order to avoid taking physical possession of the underlying commodities, these funds conduct a regular "roll" process, selling contracts nearing expiration and using the proceeds to purchase longer-dated futures contracts. As such, futures-based products are impacted by three factors: 1) changes in the spot price of the underlying commodity, 2) interest earned on uninvested cash, and 3) the "roll yield" incurred when near-month contracts are exchanged for longer-dated futures. If prices for future delivery are significantly higher or lower than the current price level, the third of these factors can contribute significantly to overall returns.
While the returns to futures-based commodity funds will generally exhibit a strong correlation with spot prices, the movements are often far from perfect. Perhaps the most extreme example is the United States Natural Gas Fund (UNG). In 2009, natural gas prices remained stable, but UNG (which implements a futures-based strategy) lost more than half of its value as a result of consistent contango in futures markets (see What's Wrong With UNG).