In general, the goal of an S&P 500 index fund is to replicate the performance of the S&P 500 Index. To do this, the fund will buy the same stocks in the same proportions as the weighting of the Index.
The S&P 500 Index is free-float capitalization weighted. This means that the higher capitalization stocks (based on publicly traded shares only) are more heavily weighted and factor into the Index value more heavily than the smaller capitalization stocks, or the stocks that have a smaller publicly traded value. For example, companies like Apple, ExxonMobil, and Microsoft have a much larger weight in the index value than smaller companies.
Alternatively, there are some S&P index funds that are equal-weighted. In these funds, the managers have chosen to purchase all 500 of the stocks in the index, but in equal proportions instead of the weighted proportions of the index. These equal-weighted funds will not as closely match the index price as the traditionally weighted index funds. Instead, they might do better or worse than the index, depending on how the individual stocks do.
You'll need to look at the prospectus of the index funds you are interested in to see which approach the fund is taking.