Just because your employer contributes to your 401(k) doesn't mean the money is really yours. Until you "vest" in a retirement account, the company can withhold some or all of its contributions if you leave your job. Once you vest, everything is yours, even if you quit the next day.
Vesting isn't an issue with any contributions you make to the account. If you put payroll deductions into a 401(k), for instance, that money is 100 percent vested from the start. Only employer contributions take time to vest. With some plans, even your employer's money is yours from the get-go. If the company offers individual retirement accounts, such as a SEP or SIMPLE IRA, federal law requires the money in those plans vest as soon as its contributed.
With 401(k) accounts, profit-sharing plans and other investment accounts, you may have to wait a while to vest. Some employers will let you vest 100 percent in the plan from the beginning, but others require you work at the company for, typically, three to six years before you're fully vested. Vesting may also depend how much you work: if you put in less than 500 hours in a year, for instance, the employer doesn't have to count that year in the timetable.
Usually, employers practice either cliff vesting or graded vesting. With cliff vesting, nothing vests until you hit a trigger, such as working there for three years, putting enough hours each year to meet the plan requirements. At that point, everything in your account is yours, and subsequent employer contributions are 100 percent vested, too. With a graded schedule you might get 20 percent vesting the second year you're there, then 40 percent, then 60 and so on.
If, say, you have a plan with three-year cliff vesting and you quit after two years, you leave with nothing but your own contributions and your earnings. If you have graded vesting and you're at the 60 percent level when you leave, you get 60 percent of the employer contributions. No matter what schedule or terms the plan includes, you have to reach full vesting by the time you turn 65, or after 10 years of service, whichever date is later.