There's a catch here. When you take the money out of your 401(k) to do an indirect rollover, your employer is legally required to withhold 20% for taxes. But you must deposit 100% of the account's balance to avoid taxation on that 20%.
Imagine you have $100,000 in your 401(k). If you do an indirect rollover, you'll get a check for $80,000. You'll need to come up with the other $20,000 on your own to avoid taxes and penalties on it. If you do that, you'll get the $20,000 that was withheld back when you file your tax return for the year.
That's why the direct rollover method is usually considered safer. You don't touch the money at all, so you don't have to worry about owing taxes right now. It is possible to do an indirect rollover without paying taxes as well, but make sure you deposit the new funds right away to avoid any issues.
401(k) tax rules aren't that complicated, but they're too often overlooked. Make sure you understand all of these rules and consider the tax implications before you make a withdrawal. Try to avoid making any withdrawals at all until you're ready to retire, and, even then, take out only as much as you need during a single year. This will help keep your tax bill low, and it will give your savings more time to grow so they'll be worth more in retirement.