So there are three options:
1. If you need the passport within the next 2 days.
2. If you need the passport within 3-25 days
3. If you need the passport within 26+ days.
In the first two cases you need to visit one of 35 specialized Passport Canada centers and provide a proof of travel OR need (doesn't have to be a ticket as you may need the passport for something other than travel e.g. a job application abroad).
Visits to the Passport Canada centers are either via prior online booking or via walk-in. For option 1 above, you will only opt for walk-in (be prepared for a long line-up in most of these centers). An appointment would give you priority over walk-ins waiting to be served.
For option 3 above, you could send in your application by mail.
To book an appointment at a specialized Passport Canada center, please use the link below:
https://eservices.canada.ca/en/reservation/