If you need a TRV to enter Canada, you should apply for your work permit at a visa office in your home country or country of residence(if you have been legally admitted) before coming to Canada. If approved, they will issue a TRV(i.e. work visa) and give you a LOI(letter of introduction). When you arrive at the first port of entry, present the LOI and a border officer will issue your work permit.