Under residence jurisdiction, the most prevalent type of jurisdiction, a country taxes the income of its residents, whether generated inside or outside the country. Citizens of residence jurisdiction countries pay taxes on their worldwide income, regardless of their current place of residence (i.e., whether currently living in the country or not).
Under source jurisdiction (a.k.a. territorial tax system) a country levies taxes on all income generated within its borders, whether by citizens or foreigners.