With respect to retirement plans, “vesting” simply means ownership. In other words, you will vest, or own, a portion or all of your account in the plan based on the plan’s vesting schedule. All 401(k) contributions that you make to the plan, including pre-tax and/or Roth contributions made through payroll deduction, are immediately 100% vested. Those contributions were money you earned as compensation, and so you own them immediately and completely.
Employer contributions made to the plan, however, usually vest according to a plan-specific schedule (called a vesting schedule) which may require the employee to work a certain period of time to be fully vested or “own” those funds. Often ownership in employer contributions is made gradually over a number of years, which can be an effective retention tool by encouraging employees to stay long enough to vest in 100% of their employer contributions.
If you leave your current employer before you are fully vested, you only have ownership rights over the contributions you personally made as well as the portion of your employer match contribution that has vested. Vesting schedules vary by employer and plan, so you should check your Summary Plan Description (SPD) for your plan’s specific schedule.