Learn how index funds invest in market indexes like the S&P 500 for broad diversification and market performance replication.