from the srd:
Hit Dice
This line gives the number and type of Hit Dice the creature has and any bonus hit points. A parenthetical note gives the creature’s average hit points. A creature’s Hit Dice total is also its level for determining how spells affect the creature, its rate of natural healing, and its maximum ranks in a skill.
Creatures With Character Classes
If a creature acquires a character class, it follows the rules for multiclassing. The creature’s character level equals the number of class levels it has, plus the total Hit Dice for such beings.