While in an inn or a major city (such as Thunder Bluff), your player portrait will begin to glow and your level in your portrait will be replaced with the letters "ZZZ", indicating that you are resting. If you log off here, you will continue to rest while offline. When rested, your XP bar will turn blue, and a notch will appear indicating exactly how rested you are. You will earn double XP from killing monsters while rested until your XP bar fills to the notch.
Experience you gain from a quest has no effect on the amount of rest you have left over, and it will not double up if you are rested.
One bubble of rested XP is earned for every 8 hours spent resting, up to a maximum of one-and-a-half full levels. In other words, you can leave your character resting in an inn for up to ten days without playing before you earn the maximum amount of rest state.
You also become rested while logged off in the wilderness, but only at 1/4 the normal rate. Be sure to log off at an inn or a major city whenever possible! And if you're at an inn, make sure you see the resting icon. It is usually a good idea to hearth back to the inn of your binding, if you can't run there quickly enough.
To set or change your bind point, talk to an innkeeper and click make this inn your home.
When you are about 5th or 6th level, you will receive quests to go to another town area. This town is where the first inn available to a new character is placed. Put another way, until you get your first 5 or 6 quests out of the way you will not happen across an inn and so you will have to 'camp out' when you logout, unless someone shows you where it is so that you can go there before you receive such a quest.