In the singular form, a hit die is the die rolled to generate hit points. In the plural form, hit dice (HD) is a measure of relative power that is synonymous with character level for the sake of spells, magic items, and magical effects that affect a certain number of hit dice of creatures.
Class hit die[]
A character rolls one hit die each time he or she gains a new level, then applies any constitution modifier to the roll, and adds the result to his or her hit point total. Thus, a character has the same number of hit dice as levels. For his or her first hit die, a 1st-level character gets the maximum hit points rather than rolling (although constitution modifiers, positive or negative, still apply).
NOTE: NWN2 currently does not roll for HPs after lvl 1 but assigns maximum HPs for each lvl to player characters, and unlike NWN1 or any other previous DnD based game, does not offer the option of playing with a ruleset closer to Pen and Paper DnD by rolling for HPs at any level. Unfortunately this causes an inbalance between the classes so complete that even the game designers had to cheat when creating adventures, since Hit points is a class-dependent variable. In essence, changes in hit points benefit certain classes more than others.