To answer this question, we should first define exactly what an index fund is. An index fund is a mutual fund, or a basket of stocks sold by a mutual fund company, that attempts to mimic or trace the movements of a given index.
You can buy index funds for numerous different indices, including the S&P 500, the Dow Jones Industrial Average and the Russell 2000. With an index fund, you are buying ownership into a portion of a portfolio composed of stocks that are weighted in such proportions as to track a desired index.
A trader engages in shorting when he or she borrows a security, usually from a broker, and then sells it to another party. The short seller hopes the security's price will go down so that he or she can pay a lower price when buying back the security to return it to the lending party. If successful, the short seller will profit from the difference between the price at which the security was sold and the lower price at which it was bought back. Because you purchase and redeem mutual fund units from the mutual fund company and (generally) not on the open market, you can't short an index fund.
However, as technology has evolved in other areas of the economy, it has also done so in the financial sector. The need for an index-tracking, stock-like security was recognized and the security known as an ETF, or exchange traded fund, was born. An ETF's value is tied to a group of securities that compose an index. Investors are able to short sell an ETF, buy it on margin and trade it. In other words, ETFs are traded and exploited like any other stock on an exchange.
ETFs attempt to track a given index, so they fluctuate in price throughout the day as the index fluctuates in value. However, as an ETF's price depends on the forces of supply and demand (which change with the movement of the underlying index), an ETF might not track the market in perfect unison, but most come very close.