Under a territorial system, what matters is where income is earned, not where you live. Money you make from work, clients, or investments outside the country is generally not taxed there — only income sourced within its borders is. Panama, Georgia, Costa Rica, and Malaysia (for foreign-sourced income) are well-known examples.
Territorial isn't the same as tax-free: local income is still taxed, and 'source' can be argued over, especially for remote work physically performed inside the country. Some systems are remittance-based, a close cousin that taxes foreign income only when you bring it in.
Why it matters for your move
For someone earning from abroad — remote workers, investors, retirees on foreign pensions — a territorial country can dramatically cut the tax cost of a move. It's one of the highest-leverage factors in where you base yourself.