Gold Coins, or simply Gold, is an in-game currency. It can be spent on various upgrades, such as increasing the level of traps or the number of lockpicks.
Gold is also used to upgrade the throne and to skip the dungeons that you do not wish to break into.
There are three ways to get coins:

1. Mining

At the center of your dungeon is the gold mine, which provides you with a constant supply of coins. Upgrade your Gold Mine Capacity and Gold Mine Speed in the upgrade menu to increase your income. To access the upgrade menu, tap on the castle icon in your dungeon or simply swap down.

2. Collecting skulls

When someone dies while attacking your dungeon, they will leave a skull where they died. Simply tap on the sculls to collect them and get extra gold.
Upgrade your Skull Gold Bonus to get more coins for collecting skulls. This is particularly effective if you have a good defense.

3. Selling gems
If you don't have enough gold, you can sell one of your gems. To do this, tap on the gem and drag it to the bottom right corner of the screen. A confirmation window will appear. Tap "Yes". 
Please note that this action is irreversible. You will lose the rating points that the sold gem had. Gems with the lowest rating will  automatically be sold when your inventory is full (except Unique Gems). 
If you don't have enough gold to upgrade something, you can spend blue orbs instead.