Aside from battling, your team’s gyms gives you the option to store your Pokemon, which adds it to the roster that defends the location from opposing trainers. You can only store one Pokemon at a single gym, but you can defend up to ten gyms. This feature provides you with 10 Poke Coins and 500 Stardust per stored Pokemon every 21 hours. To redeem these rewards, simply tap the shield icon that appears at the top right of the Shop section.
Keep in mind; the Pokemon you store at a gym will be tied to that location, and cannot be used or recalled until it’s beaten. If it is defeated while defending a gym, it will be returned to you damaged, and in need of healing.
Originally Posted by: gamespot.com