A player have to put a Pokemon to own a gym. The Pokemon in the gym cannot return to the player unless the gym is taken over.
Some of players may forget which Pokemon they put in gyms, but there is a way to see their defenders.
To see the Pokemon you put in a gym, open your Pokemon storage first, and some of your Pokemon has a gym sign at the upper left of it.
How to take over a gym without a battle | PokemonGo
How to dodge an attack successfully | PokemonGo
Tips for Winning Gym Battles in Pokemon Go | PokemonGo
Charmander nests and spawn locations
The Best 10 Pokemon to Win Gym Battles
Kabuto nests and spawn locations