Gift Codes can be received in E-Mail Updates, which can be sorted out for yourself under "Player>Account", and other miscellaneous promotions.
To use your Gift Code...
On Desktop: Go to "Player>Rewards>Gift Code"
On Mobile: Go to "Player>Gift Code"
Then enter the code in the input box and click "Send Code".
Gift Codes always have an expiration date, often after the month they're added. Furthermore, there is a limitation to how many accounts can process them, so be quick about using it if you want to claim your reward!