A national side for a particular match, series, or tour is chosen by a panel of selectors, who are senior administrators and frequently retired players. They choose a squad for a match from the pool of available first class players in the country. The choose what they believe to be the best combination of players for each given match. Established players who are unquestionably the best in the country will earn frequent selection, usually only interrupted by injury or suspension. Lesser players may be chosen more sporadically, having to prove themselves worthy of selection to remain in the side, against other players of similar ability. Occasionally the selectors will choose a relatively unknown player out of the blue, who may only play a single game, or may perform well enough in his first chance to be selected again.
As players get older, they may lose their selection place to younger players. Some players choose to retire from international cricket before they lose too much form to be selected again - they may continue playing first class cricket but are simply regarded as ineligible to be selected for national duty. Retirement can be reversed, if the player decides he does want to be considered again for the national side.
Selection in a national side is a great honour - arguably the greatest one can achieve in the cricket world.
Each club side also has its own administrators, who select the best players each week to make up the top level side for that club, as well as assigning lesser players to lower grades of the club competition.
This means cricket has a hierarchical structure of selection based on playing merit. Any player in the country may join a local cricket club. If he is good enough, he will be selected for the club's top level side, and take part in the premier local amateur competition. If he performs well at this level, first class selectors may choose him to represent his regional first class side. At this level, the national selectors evaluate the players and may choose the player to represent the national side at Test or ODI level.
This hierarchical selection structure is unlike most professional sports, in which each team is run more or less as an independent business, and the players are essentially assets that can be contracted and traded, and play only for the one team. Even the best Test and ODI cricket players still play for their first class sides when their country is not playing an international match, and even for their local club side if there is a weekend without an international or first class match on.
Well known international players can of course also earn substantial incomes from promotional work.