Crown gems are earned by winning 3v3 matches (attack and defense) which reward 120-180 crowns, completing quests like 'The Prince's Plight' for 30 crowns and opening card packs. The amount of gems won depends on your performance while playing attacks and defense battles. Using different cards while attacking or defending give an extra edge over the opponent, increasing the chance to win and also netting more rewards like crown gems and gold coins.