Sort:  

I don't think citizenship matters. The only thing that matters is:

a] where the money is made (earned)
b] where the money is moved to

So earnings of US citizen in Frankfurt Stock Exchange (EU) will be taxed in Germany. If said US citizen is currently living in Germany and spends it there, there is no taxation from US authorities. Once this US person moves their earned money to US, it will be taxed again according to US tax code. This is called double taxation.
Most developed countries have treaties, which enable you to avoid double taxation. This means, that you would only be paying the difference between German and US taxes when moving the money to US (which would actually mean you wouldn't pay any, because German taxes are higher than US taxes). The problem is, that this entails another batch of paperwork including tax bureaus in both Germany and US. You can imagine this is not pleasant.

I think it works the same for companies. This is the reason, why US companies are hesitant to bring money back to US. They are holding them abroad and waiting for tax holiday. If they brought money back, they would have to pay the difference between the US tax and the tax of the country of origin.