If you have a free song credit from, for example, a Coke or Pepsi promotion and you're buying a song, that credit gets used first. It doesn't matter what other credits or allowances you have in your account. Buy a song, use the song credit.
Gift certificates, prepaid cards and allowances form the second line of use. If you're buying an album (can't apply free song credits to albums), or if you've used up all your free song credits, these credits get used. If the cost of your items is less than your credits, you're done and dandy. If not, the balance moves up to your credit card.
Your credit card only gets charged after you've exhausted all these other kinds of credits, and only for the remaining balance after applying the free songs, certificates, cards and allowances to your purchase. The credit card is basically the last line of defense, picking up any extra billing at the end of the purchase.