Vesting is used in order to reduce the risk that a founder or key employee leaves the company prematurly and keeps all the shares. Vesting means that such shareholders are not entitled to the full amount right away, but rather over a period of time (time based vesting) or upon achievement of milestones (performance based vesting).
For example, if an employee was offered 200 stock unites over 5 years, 40 units would vest each year. This gives employees an incentive to perform well and stay with the company for a longer period of time. Hence, it defines how many shares a good
leaver can keep, depending on the time of termination.