When you set up your 401(k) plan at work, you are provided with a beneficiary designation form. On this form, you must pick a primary beneficiary and a contingent beneficiary. A primary beneficiary receives your account balance in the unfortunate circumstance in which you die. A contingent beneficiary is designated in the event your primary beneficiary dies before you die. Since a dead person can't inherit assets, your 401(k) account balance would go to the contingent beneficiary you identified if your primary beneficiary is no longer alive.
Most people never think about their beneficiary forms again. While that can often be okay, it can occasionally be extraordinarily problematic. Let's say you subsequently divorce. Years later, you remarry. You quickly update your will so that your new spouse would inherit your home and other assets upon your death. Being thorough, you contact your life insurance agent and similarly provide the necessary updates.
Years later you die.
Your home will pass to your new spouse, following the terms of your will. Your life insurance will go to your new spouse too, thanks to that call you made to your life insurance agent. But your 401(k) plan? That's going to your ex-spouse, because you never updated the 401(k) beneficiary designation form. Unlike certain other assets, the passing of a 401(k) account does not follow the terms of the will. The beneficiary designation form is the guiding document. Make sure you periodically review those 401(K) beneficiary designation forms, especially if you've had any major family changes since you set up the plan many years ago.