Gems

Summary
Gems are the premium in-game currency used to advance players' villages. When players first download the game they begin with 500 Gems. Additional Gems can be earned in-game by completing Achievements or clearing Obstacles, or purchased with real money. Gems can be used in several ways:
 * There are several items, such as the Pirate Flag, the Mighty Statue and Builder's Huts, that can only be purchased with Gems.
 * Gems also can be used to buy other Resources such as Gold, Elixir or Dark Elixir in varying amounts.
 * They can be used to instantly finish the Troop training queues in Barracks and Dark Barracks.
 * Gems can also be used to instantly complete the construction or upgrade of Buildings, or Troop upgrades in the Laboratory.
 * Players can also speed up the production of Barracks or resource collectors such as Gold Mines, Elixir Collectors and Dark Elixir Collectors for a period of time using Gems.

Additional information on Gems can be found on the Resources page.

Buying Gems
Gems are available in the shop in the following amounts:

Earning Gems
Gems can be earned in the game by completing Achievements or clearing Obstacles. When trees, rocks, bushes, etc. are removed, players receive a small amount of xp (level points) and sometimes earn between 1 - 3 Gems. When you complete challenges in the Achievements menu, for example, 'clear 50 obstacles', players are rewarded with Gems. When players reach 1250 Trophies, they receive 450 Gems. This is the most Gems you will be able to gain through achievements, so use them wisely.

Another way to earn Gems is to clear Obstacles, which are a never-ending (albeit slow) source of Gems.

A further (although limited availabilty) way to earn Gems is to be one in the Top 10 players of the Top 3 Clans. At the end of each two-week period, the Top 3 Clans earn 20,000 Gems for 1st, 10,000 Gems for 2nd and 6,000 Gems for 3rd; these totals are divided equally amongst the Top 10 players of the respective Clans.

Trivia

 * Clash of Clans is free to play, but contains a premium currency (in this case Gems) available for purchase that gives players in-game advantages. These type of games are called 'Freemium' games.
 * As players buy larger amounts of Gems, the cost per Gem decreases.
 * Many (if not most) high-level players buy large quantities of Gems; Jorge Yao, the current top player in the world, has stated in interviews that he has spent over $2,000 buying Gems.