An index fund is a passively managed mutual fund or ETF that seeks to match, net of fees, the performance of an underlying stock, bond, or futures index.
For example, the most popular index ETF, SPY, simply tries to match the overall performance of the S&P 500 index, which tracks the 500 largest companies traded on US markets.
This tracking is achieved by frequent, automatic rebalancing of holdings in the fund to closely track the relative weighting of holdings in the underlying index.
Because index funds are passively managed (which in practice means that computers decide when to buy and sell), they tend to have very low fees, and thus are able to track their underlying indices quite closely.
Invented in the 1970s by John Bogle, founder of the Vanguard investment group, index funds have skyrocketed in popularity in recent years, as evidence has accumulated that index funds tend to significantly outperform actively managed funds over the long term.
Today there are a wide variety of index funds that track almost every index imaginable, allowing investors to gain exposure to specific industries, market sectors, or commodities while providing assurance that while markets may go up and down, at least they will match the average performance of that sector or industry.