So if you have a 401(k) you agree to have part of your paycheck go to a fund and your employer matches however much you put in up to a certain percent. It helps get around some taxes when you eventually pull the money out for retirement.
Originally it was supposed to be a supplement for pensions but pensions meant less profits because they need to be fully funded, so over the years big corporations pushed 401(k)s as an alternative to pensions because they can just push that responsibility onto us.
Personally I'm way happier with a 401(k) than a pension. Risk is more distributed with a pension, yes, and many people don't have the knowledge or resolve to properly manage their own retirement funds. But pensions are a royal PITA, way more complicated (and expensive) to manage than a 401k. So if I had to choose between money coming out of my paycheck to go into a complicated expensive pension fund that may or may not be around in a few decades, OR a 401k that I have complete control over and can take with me when I leave the company, I'll take the 401k every day of the week.