The Trump Administration first used the International Emergency Economic Powers Act to declare a national economic emergency and impose tariffs on countries under the pretence that they were economic threats to America.
The Supreme Court ruled against the tariffs because while it allows the president to regulate foreign imports as a measure against economic threats; it does not specifically grant the president power to impose tariffs, duties or other taxes which is typically a power that belongs to Congress.
The tariffs on Canada are now being imposed under Section 338 of 1930's Tariff Act which allows the president the authority to apply up to 50% tariffs on countries the president finds has "discriminated", directly or indirectly, against the United States.