From SRD 5.2.1
Experience Points
As they overcome challenges and complete adventures, characters earn Experience Points (XP), which are awarded by the Dungeon Master. When a character's XP total crosses certain thresholds, the character's level increases. The Dungeon Master's Guide provides guidance on awarding XP. See also chapter 2 ("Level Advancement").