Gems are a rare resource in clash of clans. You can gain them by doing a in app purchase but also during the game. You can earn gems by removing trees and rocks in your base or by completing achievements. The top players and clans also receive free gems in the tournaments.
With gems you can: