You can use the gift card them to pay for Apps/Music/Books downloaded from the Apple App Store and the Google Play Store. You purchase one for a specific value ($20, $50, etc) and then activate your card and you will have that value available to you in the Apple App Store/Google Play Store.
They are a great way to pay for your Apps/Music etc without giving Apple/Google your credit card details. It also means that you can only spend as much as is available on the gift card. If you have no credit, next time you try to make a purchase you will be asked to enter credit card details - or simply purchase and activate a new gift card.