This article in etf.com does a very nice job of explaining how ETFs manage to track their net asset value (NAV). It is a two-tiered market. Ordinary investors buy and sell on the exchanges. If the value of an ETF (for example SPY), wanders too far off from the price of the underlying stocks (the S&P 500 in this case) then the 2nd tier of the market kicks in. Big firms buy or sell-short the underlying securities as appropriate and lock in the profit by hedging with the ETF shares themselves. At the end of the day these large blocks of ETF shares (50,000 shares in the case of SPY) can be exchanged with the fund to close out the position.
Pretty cool. The ETFs don’t need to do anything in order to keep their product tracking the index, they just need to let greed do the work. This arbitrage process gets harder if the underlying instruments have wider spreads (e.g., small cap stocks), or if there are time zone issues (e.g., Asian markets are closed while the USA market is open). In these cases the gap between the NAV and the ETF will widen.