There are two ways to level up through the console: set your level directly, or pour in XP and let the game level you naturally. Open the console with ~ (how to open the console) and use whichever fits.
Set your level directly
Use player.setlevel to jump straight to a level:
The base game caps at level 30; with all DLC installed the cap is 50. Note that setlevel sets your level number but doesn't award the skill points and perks you'd normally pick — for those, grant XP instead.
Add XP to level up naturally
Add experience with player.modav on the xp actor value. The game then levels you up and lets you choose skills and perks the normal way:
Each level needs progressively more XP, so add a large amount and level up repeatedly at any time.
Related cheats
Once you're high level, you may want to max out your SPECIAL and skills or add perks directly. The xp value and every other stat are on the character variables list.