If a trainer finds a Gym on the local map, which is colored silver, the trainer can take it. Once taken, the trainer, or someone from their team, can place a Pokémon to defend the Gym. The Gym can store additional Pokémon the more prestige it has. Trainer can increase the prestige of their team's gyms by training. To increase prestige, the trainer must defeat at least one of the Pokemon currently defending the gym and are only allowed to use one of their own Pokemon. If they defeat all of the pokemon, then they'll get bonus experience and prestige. If multiple trainers battle at the Gym, all trainers will receive XP.
For each Pokémon the trainer had placed inside the Gym, each 21 hours, when the online shop is accessed, the trainer receives 10 PokéCoins and 500 Stardust per each Pokémon in any Gym.
To attack, the trainer has to tap the phone to let their Pokémon attack the opponent. The more Pokémon battles, the more energy it stores for a greater attack. To unleash the second attack, tap and hold until the small blue bar below the energy bar fills up, then release. Trainers can bring up to six Pokémon. After the battle, the trainer can have a rematch with the Gym at any time. Winning a battle at the Gym also provides some items.
Prestige is valued by the battles the Gym has. The more victories the Gym receives, the prestige is increased; likewise, if the Gym loses a battle, its prestige is lowered down. Once the prestige is at 0, the trainer loses the control of the Gym, whose color turns to silver and can be taken by anyone. The prestige alters the Gym's level, which modifies how many Pokémon can be stored in the Gym. The maximal number of Pokémon to be stored in the gym equals the Gym's level.
Prestige points can be altered by following actions:
|Place a Pokémon in the Gym||Gain +2000 points|
|Defeat a Pokémon during Gym training||Gain +100 points|
|Defeat all Pokémon during Gym training||Gain +50 points|
|Defend the Gym||Gain some points|
|Defeat an opponent's Pokémon||Lose -500 points|
|Defeat all of the opponent's Pokémon||Lose -1500 points|