Experience Points
Regardless of what color it is, the experience bar tracks the number of experience points (XP) you've received since last leveling up. When you kill a monster or complete a quest, you're awarded XP; the number of points rises as monsters become more powerful and quests become higher-level. Once you've accumulated a certain number of XP, your character will level up, becoming more powerful; each time you level up, it will take a greater number of XP to level up again. The bar at the bottom of the screen shows how close you are to leveling up: when it is completely filled, your character will advance in level once, and the bar will empty.
Resting
Certain locations in the game -- inns in small towns, the entirety of large cities -- cause your character to become "rested" merely by entering them. As you spend time in these places, your character becomes increasingly well-rested; if you log out of your account and exit the game while in such a place, your character will become more rested even while you are not playing. When you are well-rested, you will accumulate XP twice as quickly -- killing a monster that would normally give you 50 XP will now give you 100, for instance. Your character will remain rested until you accumulate a certain number of experience points, after which you will return to normal status; the number of points you can get before the well-rested bonus disappears depends on how long you spent resting.
The Blue Bar
When your character is well-rested, the usually purple experience bar turns blue, and hovering your cursor over it will pop up a tooltip indicating your well-rested status. In addition to the part of the bar that's filled up with the XP you've already attained, part of the experience bar will be filled in with a translucent blue -- this indicates how many more XP you can get before the well-rested bonus disappears. When the translucent part of the bar has filled in with solid blue, you'll be notified you are no longer well-rested and the bar will turn purple again.
Purpose
The resting mechanic is designed to even the playing field a little between players who are logged into the game near-constantly and those who take breaks: if you leave your character in an inn or city for a day or two, you can accumulate XP very quickly when you log back in. It's also intended to discourage the playing binges to which massively multiplayer role-playing games in general, and "World of Warcraft" in particular, lend themselves.