Meanwhile, some generous companies will even match a percentage of employee contributions.

For example, the software giant Oracle (ORCL) matches at a rate of 50% up to the first 6% of an employee’s contributions. Employers like this put free money toward your retirement. If your employer offers a 401(k) match and you contribute nothing, you’re saying no to this free cash.

As you get closer to retirement, your target-date fund would focus less on relatively volatile investments like stocks and instead invest more in bonds and cash equivalents.

If you’re confused about how to invest your 40(k), a representative from your plan can walk you through the process.

A 401(k) has some drawbacks, of course. When you retire, you’ll have to pay income taxes on money you withdraw. If you withdraw money before the age of 59 1/2, you may be subject to a10% tax on top of any income tax you’ll owe (with some exceptions, including money withdrawn for higher-education expenses).

Some employers also have a time obligation on company matches called a vesting period, meaning you have to stay with the company for a certain amount of time to get your match. Moreover, you can’t simply throw as much money in your 401(k) as you’d like: The max you can contribute is currently $18,000 a year.

Despite these restrictions, a 401(k) could be your best bet for saving for retirement — particularly if your employer offers a match.

Your 401k can be a key part of your retirement savings. Understanding how a 401k works is a great step toward controlling your finances.