There are several ways that you can earn coins and gems and they include collecting treasure chests, completing missions, and participating in Bonus Events.
Treasure Chests
Gathering the five daily treasure chests that are scattered across the map will earn you some coins and gems. The rewards you find in each chest gets progressively better with each one you find. Try to collect all 5 each day so you max out your bonuses. You will be able to find the treasure chests easily by using the map.
Missions
Each day there are three missions to complete and doing so will reward you with coins. These missions regenerate every couple of hours after completing them which makes them a good source to get coins.
Bonus Events
Participating in the various types of bonus events that randomly appear will enable you to recieve decent rewards. More often than not these tournaments will be a collaborative quest where everyone in the world works together to reach a goal. Bonus events are always worth attempting regardless of what it is as you will be given some kind of reward no matter how well you do.