No job is for life. Any employer can fire any employee (subject to any collective agreement or other agreement in place) if they give adequate prior notice to the employee.
Employment Standards legislation sets a minimum amount of reasonable notice. It is a sliding scale which starts at 1 week if employed between 3 months and 2 years and ends at 8 weeks if employed more than 10 years. Usually, what you would get at common law is a higher amount.
At common law, a court looks at a series of factors to determine reasonable notice. It is an art more than a science and court awards vary greatly. The factors looked at include: age, education, nature of position, length of service, conduct of employer, and whether or not you were asked to apply for the job or applied yourself.
You can be given “working notice” (far less popular), which means you still do your job but are under advisement that it will be disappearing in the future, or a monetary amount “in lieu of notice”, either paid monthly until you find other work, or paid as a lump sum (the most popular).
Sometimes, you are unsure whether or not you have actually been dismissed from your position. This appears most commonly on reorganizations or mergers, when your current job disappears or changes and you are asked to “move” to another position. An employer can find that the job has changed enough (through duties, perks, salary, reporting relationships, etc.) as to be found to be “constructively dismissed”by the employer. Damages for wrongful dismissal can then be sought. However, an employee has to be careful that they do not make a mistake and quit their job, only to have a court later find that the duties were not that drastically changed.