A few years ago, I worked for a company based in Taiwan. Whenever I received a check from this company, taxes paid to Taiwan were deducted. Then, during tax time in the United States, I was required to report that income, even though it was earned working for a foreign company. The good news is that I received a tax credit for the money paid to Taiwan’s government.
My situation was fairly straightforward; I lived in the United States and the income from the foreign company wasn’t very large. Others face a more daunting situation related to their residency in a foreign country.