If you're lucky enough to have access to a 401(k) plan through work, you're probably aware that you have a real opportunity to sock away some serious cash for retirement. Currently, the annual contribution limits are $18,500 for workers under 50 and $24,500 for those 50 and over. And while it pays to focus on growing your 401(k) during your working years, it also helps to familiarize yourself with how 401(k) distributions work. Here are a few things you need to know.

1. You can take penalty-free distributions starting at age 59 1/2

Because you get an immediate tax break for contributing to a 401(k), you're expected to leave that money alone until you reach an age at which retirement becomes feasible. As per the current rules, that age is 59 1/2. Once you hit that milestone, your money is yours to withdraw as you see fit, but if you remove funds from your 401(k) prior to reaching 59 1/2, you'll be hit with a 10% early withdrawal penalty on whatever distribution you take.

Envelope labeled 401k with cash sticking out of it


Keep in mind that 401(k) plans don't offer the same exceptions to the early withdrawal penalty as IRAs. With an IRA, you can remove funds early to pay for college or buy a first-time home. But if you take an early 401(k) distribution for these purposes, that penalty will apply.

2. If you cash out your 401(k) after leaving a job, it could count as an early distribution

Job-hopping is pretty common these days, so you might encounter a scenario in which you leave your job before the age of 59 1/2 and before having another one lined up. Or you might leave for a company that doesn't offer a 401(k). If that's the case, then rolling your existing 401(k) into a new one clearly isn't an option. But if you're not careful, cashing out that account could count as an early distribution, thereby subjecting you to the aforementioned penalty.

Now if you already have an IRA, you can arrange to have your 401(k) rolled directly into that account. If you go this route, you'll never actually take possession of that money, in which case you won't have to worry about penalties. But if you don't already have an IRA at the time you cash out your 401(k), you'll get a check for whatever balance you have, and you'll also be responsible for depositing those funds into a new retirement plan within 60 days. Fail to do so, and you'll face that early withdrawal penalty.

The only exception is if you're at least 55 years old at the time you separate from the company sponsoring your 401(k). In that case, you're allowed to take a lump sum distribution on your 401(k) without getting penalized -- meaning, you're not required to roll that sum into a new retirement plan to avoid the penalty.

3. You must take distributions starting at 70 1/2

So far, we've talked a lot about early 401(k) distributions and how to avoid them. But believe it or not, there will come a time when you'll be forced to start withdrawing from your 401(k). Once you turn 70 1/2, you'll need to begin worrying about required minimum distributions, or RMDs. Your RMDs are calculated based on your account balance and life expectancy, and the penalty for not taking them is 50% of the amount you neglect to withdraw. This means that if your RMD for a given year is $5,000, and you don't take it, you'll lose $2,500. And that's way worse than the 10% penalty you'll face for removing funds early.

Your first RMD is due by April 1 of the year following the year you turn 70 1/2. This means that if you turn 70 1/2 in August 2018, your first RMD will be due by April 1, 2019. All subsequent RMDs are then due by the last day of each respective calendar year.

Since 401(k) distributions are taxed in retirement, you should be aware that by taking your RMDs, you're automatically signing up to pay something to the IRS (unless, of course, you have enough deductions to offset that income). Still, you're better off paying those taxes than losing 50% of your RMDs.

There is, however, an exception to the RMD rule. If, at the time you turn 70 1/2, you're still working for the company sponsoring your 401(k), and you don't own 5% or more of that company, you can avoid RMDs for as long as you remain employed. Once you leave that job, though, you'll be liable for those distributions.

Saving in a 401(k) is a smart way to establish a strong retirement nest egg. Just be sure to read up on 401(k) distributions and how they work. This way, you'll be better positioned to make smart decisions about when and how you access your savings.

The Motley Fool has a disclosure policy.