XP is earned through matchmaking modes and custom maps as you destroy and build units. Each race goes from level 1 to 20. It rewards with "portraits and decals" for you profile.
In fact this levelling system is "how you will earn most" of the custom profile rewards. They're busy thinking up ways to earn bonus XP like for the first win of the day.
"Getting into the game and playing as much as possible will earn you XP and rewards. Build up powerful armies, wreak havoc on the map, fight to the bitter end, and you’ll be rewarded for your efforts! There will also be ways to earn bonus experience points for a match," blogged Blizzard on .
Blizzard tease that the rewards earned each new level for the three races "get more and more epic as you progress". What level each race stands at will be displayed right next to our player portraits. Beta testers can begin collecting XP and levels once the new major update goes live for the test client.
For more information on the new level progression mechanic visit the official.