Canada is not part of the United States. Both Canada and the United States are countries on the North American continent, but they have separate governments and land territories. Canada is the northernmost country in North America, with the continental United States sharing the longest undefended border in the world.
Both Canada and the United States extend from the Atlantic Ocean in the East to the Pacific Ocean in the West. The U.S. state of Alaska is to the west of Canada's northwestern Yukon territory and the southwestern province British Columbia, so only a small part of southwestern Canada has ports on the Pacific.