If you plan to visit Canada by air or transit through Canada, and you are a visa-exempt foreign national (“a visa-exempt foreign national is a person who is not a Canadian citizen or a permanent resident, and who does not normally need a visa to enter Canada.” – IRCC), you may need an Electronic Travel Authorization (eTA). Exceptions include U.S. citizens and travelers with a valid Canadian visa. Canadian citizens, including dual citizens, and Canadian permanent residents cannot apply for an ETA.
Here is an online tool that helps you to find out if you need an eTA or a visitor visa.
Immigration, Refugees and Citizenship Canada also provides a video introduction “Electronic Travel Authorization (eTA): What you need to know”. It shows how to get your eTA before you book your flight to Canada.