Your own contributions are always 100% vested. Employer contributions may vest all at once after up to three years (cliff vesting) or gradually over up to six years (graded vesting). Safe harbor matches vest immediately.
If you're thinking of leaving a job, check your vesting schedule first. Staying a few more weeks can sometimes mean keeping thousands of dollars in employer contributions.