The simplest way to track an index would be to buy every share in the index at exactly its weight in the index, and re-balance as companies are deleted from or added to the index. The problem with this naive approach is that buying hundreds of shares adds to transaction costs.
What tracker funds actually do is to use sophisticated statistical techniques, the work of quants, to construct a portfolio that has a smaller number of holdings but that has a very low risk of deviating from market performance.
The same techniques can be combined with an element of active investing to provide both a chance of out-performance and limits of tracking error. This is called enhanced indexing.
The key advantage of index trackers is that they are very cheap. Charges are well below those of actively managed funds. The disadvantage is that they provide little chance of out-performance, but then, necessarily, neither the average active fund manger or the average private investor outperforms either. However, other forms of passive investing are also cheap and may give better returns.
Active fund managers very often place a significant proportion of the money they manage into a closet tracker.
Although many tracker funds simply follow the major market indices, there are also tracker funds that follow style indices. This means that investors can combine the advantages of a favoured strategy with the low cost of a tracker.