Levels are the basic measure of player character advancement in Dungeons & Dragons. Characters gain levels by earning experience points (XP). When a character's total XP equals or exceeds the amount needed for the next level, the character gains a level.
Gaining a level
Every time a character gains a level, the character gains a number of maximum hit points as specified in the character's class description, and the character may retrain a chosen feat, power, or skill.