After reaching a certain point in Pokemon Go, you will be asked to join one of three teams: Blue, Red, or Yellow. Join a team to create a Pokemon Gym! Gyms can be found at real world locations, just like with PokeStops.
Joining a team allows you to assign one of your captured Pokemon to an empty Gym or to a location where a team member has placed one of his or her Pokemon. Since only one Pokemon can be placed at a location, you will need to use team work to build a strong Gym.
If a Gym is already under the control of another team, you can challenge the Gym using the Pokemon in your team. Defeat the defending Pokemon to takeover the Gym for your team.