Start by opening the App Store on your iPad

Tap on your profile icon in the upper right-hand corner.

Tap on Redeem Gift Card or Code

Enter the code and you will be able to redeem your app.

If the app you want to redeem does not automatically download tap on Purchased along the bottom of the screen and the app should appear in the purchased list with a little cloud icon next to it. Tap on the cloud icon and the app will begin downloading to your device.  More details in regards to this are available on Apple's Support site at http://support.apple.com/kb/HT2519.