Credits are used to purchase classes so that you can equip them. Every floor you complete awards you some credits. The level selection screen shows you the base credit value of each floor, and you may be awarded some extra credits on your report card at the end of the floor depending on your performance.
The report card's grade depends on the amount of damage you took on the floor and varies from floors to floors. Usually, to get an A, you'd need to be hit 3 times or less. I'm not quite sure if the grade is actually based on the amount of hits or the damage, to be honest. The grade you get multiplies the amount of credits you are awarded. A multiplies it by 2, B by 1, C by 0.5 (rounded up) and D is (of course) 0.This bonus is added to the basic reward. So it you are on a floor that gives 10 credits and you get an A, you'll get a total of 30 credits
Credits can also be donated to the guidance counselor.