Gift codes are displayed via the notification window, along with various announcements. To claim them, you need to type them with the exact same spelling in the Gift Code window in the game settings/account tab.
Please mind that some codes may be related to particular events in the game or other special occasions. Such codes will be time-limited, and you won’t be able to claim them when they expire. It is always good to stay up-to-date with the game and claim the codes as soon as they are released, so as not to miss any extra items in your account.