First, do you have an iTunes Store account? If you don’t, you need to open iTunes and create an account, and there will be an option for entering the gift card in the creation process. A credit card is not necessary if you have a gift card.
support.apple.com/kb/ht2731
support.apple.com/kb/ht2534
If you already have an account, open iTunes, log in if you have to, then go to iTunes Store, click and hold your account name at the top right to drop down a menu, choose Redeem. Thats where you put in the gift card code.
support.apple.com/kb/HT1574