What is the difference between a foreign entity and a foreign affiliate of a US company? What are the tax implications of each?

I was sent to work abroad by my US employer. After a few years, I was 'localized', i.e. worked for the local entity and no longer received a W-2 or had SS wages paid for or withheld by my employer. I am not sure if the local organization is considered a foreign entity for tax purposes or a foreign affiliate of a US company.