For example,
* A US company can be prosecuted on corruption charges if it bribes an official out of its borders. This is even if what they do is not considered bribery in the country itself; you are bound to the US law even when you are doing business outside of it. The US has used this approach to clamp down corruption cases of companies in developing countries.
* Trade embargos work this way. We have an embargo on Iran and ban US based companies from doing business with them, even if its through a subsidiary that operates outside our borders
* US citizens are required to pay taxes when they live in another country (we are the only country to tax globally)
* As a US traveler, you have to follow some US laws even when you are in other countries. The US has used this to combat sex tourism. So while it may be easy to go around the country's age of consent laws while you are visting, you can still be prosecuted in the US. This is to prevent child sex trafficking etc.
Nomentatus has listed other examples in this thread.
Enforcement, on the other hand is pretty difficult. I don't see how Canada force Google to do things outside of it's borders - the worst they can do is kick Youtube out their country.