A 401(k) is a retirement plan that is provided by your employer, supporter, or sponsor. Unlike an automatic retirement plan, it is a plan that you make contributions to.
The cool thing about a 401(k) plan is that you get to choose how and where the money gets invested. You can put it into mutual funds and decide how much (by percentage) goes into each one. You can also switch the percentages around without having to be obligated to a certain fund.
The funds you place into your 401(k) are added from your paycheck before your pay is taxed. Just like an IRA, the money is not taxed until you withdraw it. Also, like an IRA, it is best to avoid withdrawing money from it until you are 59.5 years old to avoid being penalized.
All of the above applies to a traditional 401(k). However, things are different with a Roth 401(k). With a Roth 401(k), taxes are taken out on your contributions as you make them. Therefore, when you retire and began withdrawing your money, you do not have to worry about paying taxes on it.