Canada has strong social and economic ties to both the United States and the United Kingdom, and are traditional allies with both of those nations. Therefore, during the Cold War, Canada played a small but important role. They were a member of the North Atlantic Treaty Organization (NATO), and therefore in an official military alliance with all of Western Europe, Iceland and the US. If any one of those nations had been attacked, then Canada along with every other NATO nation would have gone to war with the attacker.
Canada had troops and ships committed to fight in the Korean War alongside the US and UN troops, and played a small role in intelligence gathering against the Soviets, due to their geographical location near both the USSR and the Arctic.
At the same time, Canada did not support the war in Vietnam, and had normal relations with both Communist China and Cuba, so they were sometimes considered a more neutral power.