There are a few countries worldwide that offer digital nomad visas. For countries that do NOT offer this, in theory, you have to apply for a work visa — without one, you are technically doing illegal work if you only enter the country as a tourist or visitor... HOWEVER, the whole remote work idea is new and it lies in a grey area. Given that you are just working online and are not taking away jobs from local people, it's a difficult policy that is not wholly enforced. As such, this is why a lot of digital nomads are still able to work abroad even under a tourist visa.