Tax residency is the concept every new expat should understand before anything else, because it, not citizenship, usually determines who taxes your worldwide income. The most common trigger worldwide is the 183-day rule: spend more than half the year in a country and you are generally its tax resident, though many countries add other tests, like having your permanent home, family or center of economic interests there, and some count days across multiple years. A few countries tax citizens regardless of residence, the United States being the famous example, and India applies special rules to returning NRIs. So it is entirely possible to trip into residency earlier than expected, or to be claimed by two countries at once.
That is where double taxation treaties earn their keep. Most major economies maintain networks of these agreements, which decide through tie-breaker rules which country may tax what, and provide relief through credits or exemptions so the same income is not fully taxed twice. Treaty benefits usually require paperwork, like tax residency certificates, so they help those who claim them, not automatically.
The practical advice: note your day counts from your very first year abroad, keep evidence, and spend money on a cross-border tax adviser for your first filing season in a new country. That one consultation typically pays for itself many times over.