I have just recently joined Pokémon Go. I was just wondering: when I leave a Pokémon in a gym and it gets overtaken, what happens to the Pokémon I put in?
Your Pokémon will get returned to you, fainted, when the gym is defeated. You must then heal it before using it again.
You will also receive any coins your Pokémon has accrued during its stay in the gym.
source: personal experience
And, annoyingly, although it was reduced to 1 HP through battles with Pokémons from rival teams (the use case for revives), you can't use revives to restore it, only potions and super potions.– CarlRJJul 13, 2016 at 1:02
6@CarlRJ that's by design. If a Pokémon has 0 HP, a Revive is needed - potions won't work. If a Pokémon has at least 1 HP, a potion is needed - revives won't work. This is how it has been throughout the series.– BenJul 13, 2016 at 4:33
12@Ben Which would be understandable, but when a Pokémon is defeated, they enter a fainted state, not a go to 1hp state. Surely if your pokémon is defeated at a gym, it should be fainted? That they have changed from the original game...– DrakenJul 13, 2016 at 8:25
2Ah, yes I see your point. I missed that. Yes I would agree that particular choice does seem odd– BenJul 13, 2016 at 13:11
1@Draken according to Niantic, this was a bug all along, rather than just an odd design choice. It's since been fixed, and we can no longer freely discard revives to make room for other items with abandon.– VemonusSep 8, 2016 at 18:57