How long you need to wait before your employer matching contributions become yours to keep. Employers use vesting in order to encourage employees to stay; if you leave your job before the employer contributions have vested, you lose them. Note that your own 401(k) contributions are always yours to keep and require no vesting.
There are different types of vesting schedules:
Cliff vesting. Employer contributions are fully vested after a specific period of time, in three years or less.
Graduated vesting. Employer contributions are fully vested gradually in increments, over six years at the most.
Immediate vesting. Employer contributions are fully vested as soon as they are deposited.
You can find your plan’s vesting schedule in the summary plan description.