Question: how are coins earned in pokemon go gyms?
Answer: You earn six PokéCoins per hour defending a Gym (a rate of 1 PokéCoin per 10 minutes). There is a cap of 50 Coins per day regardless of how Gyms you are defending. Your earnings will be delivered to you automatically when your Pokémon has been removed from the Gym.