Step 1: Open the Black Lion Trading Company panel (the default hot key is “O,” or you can select the lion icon in the upper left of the game screen).
Step 2; Select the “Redeem Code” button at the upper left of the Gem Store panel.
Step 3; Follow the on-screen instructions to redeem your code for gems. Gems are delivered automatically when the code is redeemed.
Official link : Redeeming Codes