This is a question asked very frequently so you're in good company. Here's how to redeem a code.
Go to the App Store on your iPad or the iTunes Store.
If in the App Store, go to the Featured page and scroll down to the bottom of the page. You will see a Redeem option. Click it then type the code there. Then press Redeem. You will be prompted to sign in to your account. Once you do, then your app will download automatically.
if in the iTunes store on your pc/mac then go to the home page. Look for the Redeem option on the left hand side of the page. Press redeem, type in the code then sign in to your account. The app will download to your iTunes account.