I sometimes see job offers that allow employees to work remotely anywhere in the world. However, reading answers on Why does a US company need to know the location of their employees for tax purposes?, it sounds like allowing employees to work remotely anywhere in the world may cause some major tax headaches to the company. Do such companies have some strategies to conveniently deal with their remote employees? I'm mostly interested in companies whose headquarters are in the US.
There are several ways to handle the situation.
First, if the employer is large enough (not necessarily Google size, but just large enough) and already doing business in several locations, adding another employee in an existing location is much less of an issue than for a small or middle size business with no previous exposure to such situation.
Second, and quite frequently, employers attempt to have the individual categorized not as an employee but as an "independent contractor". This particular approach sometimes works, but it has become more and more difficult to implement given that all sorts of authorities (not just tax) are continuously expanding the scope of what constitutes an employment relationship and what is independent contracting. Even if it works, it's a little difficult to do with individuals who are already on the payroll of the employer. And, from the individual's point of view, it's far more complicated to be an independent contractor than an employee. The individual has to file business tax returns, get his own insurance, comply with all applicable rules, etc. Some people do this feeling that they "can run personal expenses through the company" or just don't appreciate what's involved.
Some sort of a intermediate approach can be taken by using Professional Employer Organizations (aka employee leasing organizations or, in some industries, "body shops") which specialize in taking on the employer responsibilities vis-a-vis the employee and "leasing" the employee to the organization that would otherwise need to employ/contract with the individual. These PEOs are large enough and experienced enough to handle the formalities. It's not the appropriate solution in all situations and, of course, the service isn't free. I'm also not sure how a PEO would deal with the new problem of having its employees work from their own homes, as opposed to working from the offices of the contracting organization.
And there is, of course, the classic "audit lottery" approach. Some businesses just ignore the rules and do what they want to do on the assumption that "nobody will ever know". That's not really a good idea to begin with and the penalties for failing to conduct the business property can be very hefty and frequently imposed years after the fact, which makes it impossible to attempt to retroactively fix the problems.
It's obviously a complicated matter (and I'm actually oversimplifying things) and should not be entered into by anyone without serious due diligence...
From my experience (having done this) you are treated as being employed at some company facility. Assuming you're a US citizen/legal resident, if you're not a resident of the state where that facility is located, you pay non-resident state income tax in that state, and resident income tax in your state of legal residence. presumably being able to deduct what you paid to the other state. (I live in a state with no income tax, so I can't say for sure.) Then you can physically be anywhere in the world.
If you're not a US citizen or resident, things are going to depend on tax treaties between the US and your country. From the other direction, an American working for a European company, you're treated as a resident of that country and first pay income tax there. Then you can take the amount of tax paid to the country as a credit on your US income taxes.
Caveats: This is only my personal experience as of a decade or so ago, so regulations may have changed. There might also be ways of treating remote employees other than what I experienced. I think the bottom line is that if the company is of any size and has been around for a while, they will have done this many times before, and know what needs to be done.