The Canada Pension Plan is a mandatory deduction, taken from your wages in every pay period, that is matched by your employer. This goes towards a retirement pension at age 65.
The amount is based on your gross earnings, each pay period. It is NOT supposed to be your entire income at retirement, but only a minimum to build on, with your own contributions to a private savings retirement plan, called an RRSP (Registered Retirement Savings Plan).
Contributions to the RRSP are NOT taxed until you officially retire, at which time you will be in a lower tax bracket due to a reduced income level. You choose at what age you want to retire after age 65. There is no age at which you “must retire ” in Canada.