Resting is an area of the game that caused much controversy when it was introduced during the Beta test. So what is "resting" and how does it work and affect the gameplay in WoW?
What's the Rest State?
There are 2 possible states that players can be in, either "Rested" or "Normal". While in Rested state, players will earn twice as much experience points (200% of normal) while killing monsters compared to the Normal state (100%).

At the bottom of the screen right above the toolbar, players can see an experience bar which indicates their progression towards their next character level. This bar is divided into 20 equal sections, termed Bubbles. How the rest system works is simple. For every 8 hours that your character stays in an Inn or City, you will earn one bubble’s worth of Rested Bonus. In this manner, players can accumulate up to 30 bubbles (1.5 levels) worth of bonuses, equal to 10 days of not logging on WoW. On the experience bar, there is a visual marker indicating how much longer the Rested bonus will last.

When your character is receiving Rest Bonus, your character portrait will flash yellow. In addition to this, your level number in the portrait frame will also change to say "zzz".

Why have a Rest State?
The purpose of the Rest System is to allow players that play less frequently to have a SMALL bonus that allows them to catch up with their friends should they lag behind in levels. This bonus is intended to be small hence players that play more often will still tend to be of a higher level and there is no penalty for playing too much either.

How do I Rest?
You can rest by being inside an Inn or a city. It does not need to be the inn/city your hearthstone is bound to however, any will do. You are only not resting when you are killing monsters.

If you're inside an Inn or a city you will earn rest credit four times faster than if you are anywhere else in the game (not killing monsters) that is why it's advisable to log off when in an inn or city rather than anywhere outside.

Inns at the six main cities can be located on these maps:

Darnassus
Ironforge
Orgrimmar
Stormwind
Thunder Bluff
The Undercity

What's a hearthstone?
Each new wow gold character starts with a hearthstone and it's tied to your starting location until you request an Innkeeper changes it.

The hearthstone makes resting much easier as all hearthstones are bound to any one of the numerous Inns (which you set by speaking to the Innkeeper) so optimum rest is only 20 seconds or so away.

You can not sell your hearthstone and you can only have one. It doesn't cost any mana to use either and you simply right click it to activate it.

How is Rest Credit calculated?
The resting system has been calculated so that eight hours of rest at an actual Inn will allow players to gain one bubble’s worth of rest bonus. Players that log off outside of an Inn or rest city will gain one bubble’s worth of rest bonus after 32 hours (4 times as slow). This calculation is also proportional, if you only rest for 4 hours in an inn, you will gain half a bubble of bonuses. If you leave the inn, you will simply stop resting, and if you then return, you will start resting again.

Note that the Rest bonuses only apply to experience points gained from killing monsters, it does not affect or adjust the amount of experience points for completing quests. Similarly, completing quests will also not affect the amount of rest bonus you have remaining, the indicator on the experience bar will shift forward accordingly.

When players reach the level cap, they no longer gain experience points. Even so, players will still continue to accumulate rest bonuses.