Essentially you register as self-employed, get a business number and GST number and invoice them. The GST is zero-rated because it's classed as an export. They don't deduct any
taxes, they just pay you, the CRA will probably require you to pay
taxes on that money in installments as a self-employed person.
If they want they can issue a 1042-S (similar to a 1099 but for non-resident aliens) which helps you to fill in your T1. Because of the US-Canada tax treaty they're exempt from doing the 30% non-resident alien withholding tax.
If you have a look at the CRA self-employed guide it will answer most of your questions.
You *might* be required to file a protective 1040NR with the IRS if you're earning a fair bit, over $100,000 usually, but if none of the work is physically done in the US this is essentially a blank tax return you send in, right "protective" across the top and put your name, address and SSN on it and zero at the bottom. And you might have to fill in an 8833 to formally claim your exempt from NRA withholding under the tax treaty. This is basically so the IRS can effectively audit your client in the US. If you use a corporation instead of being self-employed, the corporation has to file a protective 1120-F and 8833 every year.
It does get more complex if you do any of the work in the US, the simplest way to deal with this is to just go back on their payroll and get a W-2 from them for the work you did while in the US, and file a 1040NR and claim a foreign tax credit on your T1.
If your tax home is currently the US (i.e. you file a 1040 every year) you'll have to move it out again, which requires filing a dual-status return, Form 8822 maybe a 1040-C and various other bits and pieces as explained in IRS publication 519.
Because you're a Canadian citizen working in Canada you don't need any sort of work permit.
Steve.