As the governing body of association football, FIFA is responsible for maintaining and implementing the rules that determine whether an association football player is eligible to represent a particular country in officially recognised international competitions and friendly matches. In the 20th century, FIFA allowed a player to represent any national team, as long as the player held citizenship of that country. In 2004, in reaction to the growing trend towards naturalisation of foreign players in some countries, FIFA implemented a significant new ruling that requires a player to demonstrate a "clear connection" to any country they wish to represent. FIFA has used its authority to overturn results of competitive international matches that feature ineligible players. 

FIFA's eligibility rules also demand that in men's competitions, only men are eligible to play, and that in women's competitions, only women are eligible to play. 

Historically, it was possible for players to play for different national teams. For example, Alfredo di Stefano played for Argentina (1947) and Spain (1957–61). 

Di Stefano's Real Madrid teammate Ferenc Puskás also played for Spain after amassing 85 caps for Hungary earlier in his career. A third high-profile instance of a player switching international football nationalities is Jose Altafini, who played for Brazil in the 1958 FIFA World Cup and for Italy in the subsequent 1962 FIFA World Cup.
And he has played for what countries?
Spain