The greatest spectacle in world sports, the World Cup, is underway in Qatar. We often hear about athletes playing for a national team of a country where they were not born. How does this work? Who can play for what team? FIFA requires that World Cup players have the nationality of the team for which they play. Often, of course, players have held that nationality since birth, either from being born in that country or from being a descendant of citizens of that country. Countries with long colonial histories, such as France, Spain, and England, have often recruited players from their former colonies or have benefited from players whose families have roots in former colonies. In other cases teams recruit players from other countries and find ways for those players to naturalize. About half the players on the Qatari team were born elsewhere, with some acquiring citizenship through family ties and others through naturalization. Seventeen of Morocco's team of 23 players in the 2018 World Cup were not born in Morocco. This has at times proven to be controversial, as the jockeying of players and teams seems to undermine the idea of the tournament as a tournament between nations. Here's an interesting article that discusses nationality and the World Cup.
"Who Represents the Country? A Short History of Foreign-Born Athletes in the World Cup" - Migration Policy Institute