Index funds are similar to mutual funds in that they represent a group of stocks. When you buy shares into an index fund you are buying into shares of the stocks they represent. The advantage of index funds is that they require less management and as a result the fees are lower than the fees for a typical mutual fund. The fund manager simply takes the orders from people who want to buy and splits it up to buy all of the stocks in the index. When people sell, the fund manager sells the stocks in the index. Usually the process is simplified because there are people who want to buy and sell at the same time.
Investing in a broad index fund basically invests you in the economy as a whole. There are also index funds that track indexes in a particular sector. In those types of index funds you'll be investing in the economy of that particular sector.
Index funds are generally reasonably safe investments over long periods of time because overall the economy has grown.