The S&P500 is just an index fund of the top 500 us companies by market cap (with some rare exceptions). It's a representation of those companies, when they go well then the S&P does well. You can't really buy into the S&P, but rather you would purchase an ETF that contains the same blend and weight of stocks that the S&P has, like the SPY ETF.