Temporary Resident Visas (visitor visas) and Electronic Travel Authorizations (eTAs) both allow foreign nationals to travel to Canada for temporary purposes, such as tourism, family visits, or business. Which one you need is determined primarily by your citizenship and how you're travelling — not by your intended length of stay.
Visitor visa (TRV)
A visitor visa is required for citizens of countries that are not visa-exempt. It is a physical or electronic document (or stamp, historically) confirming that a visa officer has assessed and approved you to travel to Canada, and it's typically requested well in advance of travel through an online or paper application involving supporting documents, biometrics, and sometimes an interview.
eTA
An Electronic Travel Authorization is a simpler, faster entry requirement for citizens of visa-exempt countries who are flying to Canada (it does not apply to travel by land or sea). It's linked electronically to your passport, is generally valid for several years or until your passport expires, and is applied for online in minutes rather than through a full visa application. U.S. citizens are generally exempt from needing either a visa or an eTA to fly to Canada, though they still need proper identification.
Neither one guarantees entry
Holding a valid visitor visa or eTA authorizes you to travel to a Canadian port of entry — the final decision to admit you into Canada, and for how long, is made by a border services officer at the time of entry. Both documents should be understood as a precondition to seeking entry, not a guarantee of it.
Checking which applies to you
IRCC's tool for checking visa requirements by citizenship is the most reliable way to confirm whether you need a visitor visa or an eTA for a specific trip, since requirements are periodically updated based on international agreements and policy changes.