What is a 401(k) and how does it work? What happens when you quit or get fired?

If you're part of today's workforce, you've heard of a 401(k). In fact, nearly 35% of working-age individuals ages 15 to 64 have one, according to the Census Bureau.

But what exactly is it?

A 401(k) is a tax-advantaged retirement investment account. Typically at companies with 401(k) plans, you elect a certain percentage of your paycheck to go to your 401(k) before it's subject to the taxes you would otherwise pay on income. Many companies will match or partially match your contributions to incentivize you to save money for retirement.

Having a 401(k) match plan has become "a common expectation" for jobs and is used as a tool to recruit and retain employees, said Nathan Voris, director of investments, insights and consultant services for Schwab Retirement Plan Services.

How to buy stocks: A basic introduction for first-time investors.

What are meme stocks? How online communities use social media to outsmart the market.

"Employers have a vested interest in having financially secure employees and having a great 401(k) is a component of that," he added.

You're free to invest the funds in your 401(k) however you choose, as you would with a regular investment account. Instead of buying and selling individual stocks, most people choose to put their 401(k) money toward a target date retirement fund. These funds are designed around desired retirement dates, often taking more risk the further away you are from retiring.

But unlike a regular investment account, you cannot withdraw the funds whenever you want without facing penalties.

When can you withdraw from a 401(k)?

You can withdraw funds from a 401(k) at any point but until you turn 59½, the money will be taxed like regular income and subject to an additional 10% tax. These rules are in place to discourage people from depleting funds that are supposed to support them once they retire.

There are exceptions to the additional 10% tax for certain early withdrawals. For instance, you can use your 401(k) money to pay for health insurance while you're unemployed without facing that tax.

401(k) matching: As layoffs and recession fears mount, will employers suspend their 401(k) match?

SECURE Act 2.0: It could help you save for retirement while paying off student debt

Once you turn 72 you have to start taking a required minimum distribution withdrawal annually. You can calculate what your required minimum distribution would be through the following Internal Revenue Service worksheet.

How much can you contribute to a 401(k)?

The IRS recently announced that the contribution limit for 401(k) plans will increase by $2,000 to $22,500 for 2023 because of inflation. That doesn't include any employer matches.

Is a 401(k) an IRA?

While 401(k)s and individual retirement accounts, or IRAs, both enable you to invest money tax-free for retirement, they have important differences.

IRAs are available to people who have access to a 401(k) through their employer and those who don't. Like a 401(k) you'll face penalties if you withdraw money before you turn 59½. But unlike a 401(k), you can only contribute up to $6,500 a year starting in 2023. And the money you contribute will have already been taxed, unlike with 401(k) where it is taken out of your paycheck before it gets taxed.

There are two different kinds of IRAs: traditional and Roth. Traditional IRAs function a lot like 401(k)s except you could be eligible for tax deductions for making contributions to an IRA. When you withdraw money from a traditional IRA after you turn 59½, it'll be taxed like ordinary income.

But with a Roth IRA, there is no immediate tax benefit when you contribute post-tax dollars. The major advantage of a Roth IRA is once you withdraw funds after you turn 59½, you won't have to pay any taxes.

Do you lose your 401(k) if you quit or get fired?

You don't have to forfeit your 401(k) if you quit or get fired from your job, the money is still yours. If you get a new job where you're eligible for a 401(k) you may be able to transfer your 401(k) funds from your prior job to it. You could also transfer it to an IRA.

In most cases, you can leave it in the same account even though you won't be eligible for any matching you previously received and you won't be able to contribute more money to it.

Can I cash out my 401(k) if I quit my job?

Yes, you can cash out of your 401(k) at any time but you could be subject to tax penalties for doing so.

More of your Money questions answered

Elisabeth Buchwald is a personal finance and markets correspondent for USA TODAY. You can follow her on Twitter @BuchElisabeth and sign up for our Daily Money newsletter here

This article originally appeared on USA TODAY: What is a 401(k)? How it works, contribution limits, tax penalties