IANAL, but I've been traveling 6 months and have read a lot about this. I have never seen a work permit needed unless you are working for a local company. If you are an American working for American clients remotely, you're fine.
Always, always, always, always, always check visa requirements. If you need one and don't have one, you will be buying a very expensive plane ticket when you get turned back at the border. Default tourist visas for American citizens is 3-6 months most places, but you always have to check. Don't trust any website that's not the official government, and call an embassy if you're at all unsure.
If you are an American citizen, you always have to file taxes on wages, no matter where you earn them or who you work for (even if you steal things, you pay taxes on them).
This is distinctive for the US from what I understand. People in most western countries don't have to report to them once they've left other than to renew passports.
You usually have to pay income taxes on income earned while you're resident in a country. If you're on a tourist visa, you're not resident, but really the visa regimes aren't set up to understand this way of working.
In practice just pay taxes in your country of "residence" not the country you're in temporarily. Many countries have 60-90 day visas for visitors from first world countries.
While it would be extremely difficult to detect or enforce, and generally the language around the law is very much designed with traditional working environments in mind, it is somewhat of a gray area legally in most countries.
I've received many different explanations over what's acceptable and, of course, many government documents will seem to contradict each other. However it is not beyond the possibility that one would run into a problem with this when dealing with some local authorities.
The other thing to keep in my is that residency is often tied to a minimum number of days spent within the country you are filing taxing in. They also can take into regard your "intent" of where you plan to be living next year. You can be judged to not actually fulfilling the residency requirements and be taxed on foreign earnings.
Most people who do this won't have issues but I've witnessed had one border agent mull over whether to deny entry or let them through, based on answers to questions about activities in other countries.
Always, always, always, always, always check visa requirements. If you need one and don't have one, you will be buying a very expensive plane ticket when you get turned back at the border. Default tourist visas for American citizens is 3-6 months most places, but you always have to check. Don't trust any website that's not the official government, and call an embassy if you're at all unsure.