Yes, you're talking about the tower structures of the limited liability partnerships. It's a little hard to describe them simply, because they're not simple.
You take an entity that looks like a corporation, but it doesn't necessarily have limited liability to the shareholders. Now, the point is that such an entity would be treated as a partnership under U.S. rules, meaning that it doesn't pay tax at all; the income flows through to the shareholders and gets taxed in their hands. If you have a bunch of Canadians as the shareholders, and the corporation is operating in the U.S., then it's the Canadians who pay U.S. tax. But the point is, for Canada, it's treated as a corporation, and if there's no actual distribution from the corporation, then Canada treats the entity as not having distributed any income to Canada; therefore, there's no Canadian tax. Now there is some U.S. tax, but it's usually at low rates on a deemed distribution to shareholders, and there may be no immediate Canadian tax at all. Now, in fact the structures are more complicated than that, and they consist very frequently of not just one, but two or three layers of this type of enterprise in order to get the desired result.
The heart of it is that you can get an enterprise that's treated as a partnership under U.S. law and a corporation under Canadian law.