The USA and Canada have an Income Tax Treaty that covers monies earned in the opposite country. For USA citizens or residents the applicable publication is
Pub 597. I am sure Canada has a similar publication for its citizens.
Also the USA income tax has provisions for income taxes paid to other countries and you will normally reduce the US income tax by the amount paid to the other country IF the USA and that country have a tax treaty.
Publication 514, along with Form 1116 and its associated instructions cover that credit.