Regarding FIFA's official transfer laws, international transfer of minors is not allowed if the player is under the age of 18 (which is the definition of a minor). There are 3 exceptions, as explained in Article 19 of FIFA Regulations on the Status and Transfer of Players (pages 17 and 18):
Article 19: Protection of minors
1. International transfers of players are only permitted if the player is over
the age of 18.
2. The following three exceptions to this rule apply:
a) The player’s parents move to the country in which the new club is
located for reasons not linked to football;
b) The transfer takes place within the territory of the European
Union (EU) or European Economic Area (EEA) and the player
is aged between 16 and 18. In this case, the new club must fulfil
the following minimum obligations:
i) It shall provide the player with an adequate football education
and/or training in line with the highest national standards.
ii) It shall guarantee the player an academic and/or school and/or
vocational education and/or training, in addition to his football
education and/or training, which will allow the player to pursue
a career other than football should he cease playing professional
iii) It shall make all necessary arrangements to ensure that
the player is looked after in the best possible way (optimum
living standards with a host family or in club accommodation,
appointment of a mentor at the club, etc.).
iv) It shall, on registration of such a player, provide the
relevant association with proof that it is complying with the
c) The player lives no further than 50km from a national border
and the club with which the player wishes to be registered in the
neighbouring association is also within 50km of that border. The
maximum distance between the player’s domicile and the club’s
headquarters shall be 100km. In such cases, the player must
continue to live at home and the two associations concerned must
give their explicit consent.
3. The conditions of this article shall also apply to any player who has
never previously been registered with a club and is not a national of
the country in which he wishes to be registered for the first time.
4. Each association shall ensure the respect of this provision by its clubs.
5. The Players’ Status Committee shall be competent to decide on
any dispute arising in relation to these matters and shall impose
appropriate sanctions in the event of violations of this provision.
In the case of Aguero, Cristiano Ronaldo, Bojan and Muniain, yes, they turned pro as minors, but there was no problem with FIFA because they all were signed by and played for clubs in the countries they were residing in. FIFA only regulates the transfer of minors to countries outside their domicile. In the case of Messi, Barcelona agreed to relocate his entire family from Argentina to Spain, thus staying within the regulations. As to how the players were paid when they were minors, that would depend on the laws for employment of minors in the respective countries.
In the case of the transfer bans handed to Atletico de Madrid, Real Madrid (and previously Barcelona), the clubs were found guilty of breaching the aforementioned transfer regulations by FIFA. Atletico and Real can appeal the bans with FIFA (and then with Court of Arbitration for Sport, if the previous appeal is turned down).