Although there is a part of the game where a Team Rocket member offers the player a chance to join their team in several Pokemon game versions, there is actually no option for the player to accept the offer. In a 2011 interview with Pokemon director Junichi Masuda, he hinted that it will be highly unlikely that a Pokemon game version will ever be made where the player can accept the offer to join Team Rocket. The closest thing a player can come to joining Team Rocket is to have his in-game character wear the team's uniform on Pokemon SoulSilver and HeartGold versions.
To have the in-game character wear the Team Rocket uniform, head to the Goldenrod City. Proceed to the smaller building south of the Radio Tower and go down the stairs once you enter the building. Once underground, walk southwards and turn to the right where a photographer is stationed. The photographer will mistake the player for being a new Team Rocket recruit and will hand him a Team Recruit uniform. The uniform is actually essential to the game as the player needs it to gain access to the Radio Tower.
Team Rocket is a criminal syndicate in the Kanto and Johto regions. The team first appeared in the Pokemon Red and Blue versions, and their activities include stealing and selling Pokemon from other trainers.