There are also 529 plans. In Pennsylvania, there is a plan where you buy a “guaranteed” number of credits. No matter what the education inflation rate is, 4 credits purchased in 2009 = four credits in 2019.
I put “guaranteed” in quotes because it isn’t really guaranteed. THis year, due to poor performance, they are underfunded. So what they are doing is putting a surcharge on the credits already purchased. They sell the plan as a way to avoid risk, but there ain’t no such thing.
Any other investment has a level of risk. The stock market is one of the higher levels of risk. Historical returns are not quite as high as @MuffinMonarch would have you believe. The recent recession has changed that quite considerably. In any case, you have to remember and plan for the possibility of a significant downturn in stocks. They recently lost about 40% on average. You need to have a long time horizon to recover from that. Anyway, if you’d put 10K into a stock fund in 2007, it would be worth around 7K now.
If you’re saving for college, you don’t have that long a time horizon. About four years before your child enters college, you have to start switching investments from riskier investments like stocks to more stable ones like bonds or mutual funds. Otherwise you might suddenly find yourself forced to take money out of investments when they are worth less than what you put in in the first place.