The Retrieve button only appears when someone steals one of your gems. You can then try to retrieve it from the Defense Logs. You only get one chance - if you fail, you will not be able to retrieve the gem yourself anymore. However, you will appear in the Retrieve Logs of your friends and guildmates and they will be able to help you. Each friend will also only get one try.

Please note that retrieve attacks are not real attacks. When you or your friends retrieve a stolen gem, you get a copy of it. The actual gem is still in the hands of the thief who stole it. This is done to increase your chances of returning a stolen gem. In reality, the thief could never even install your gem in the totem. Retrieval chance is a bit lower than your chance to steal a gem during the usual attack. To actually "hurt" the player who stole your gem, make a revenge attack on them and try stealing some gold or gems they may have in their totem.