The hearthstone is one of the few items you begin the game with, and the only one you will keep throughout your entire adventure.
Early on in the development of World of Warcraft, the Blizzard designers wanted a way for a player with a sudden need to stop playing to be able to return to a home point quickly without needing the help of others, as was the case in many other MMORPGs. However, they did not want to create Scrolls of Town Portal as they had in Diablo. The result was an item that had a one-way return to an inn of the player's choosing.
Because it's purpose is to represent a player saying "I'm done, take me home," the hearthstone has a 60-minute cooldown to prevent using it as a mere teleportation tool. Many players still use it as just a means of transportation, often "hearthing" back to the town where they had been questing from or to quickly return to a major city. With the portals in the center of Shattrath, many players have elected to make Shattrath their home point to easily navigate to other parts of the world(s).
A player sets their home point by visiting an innkeeper, who will have an option to "Make this inn your home." Until the player chooses to set their home to a different inn, the hearthstone will return them to that inn whenever it is used. It is recommended that the player routinely sets their home point at the location that will make the most sense to them.
Although the hearthstone takes 10 seconds to "cast", and any damage will interrupt it, Paladins will sometimes use their hearthstone after activating Divine Shield to protect them for the duration of the cast. This tactic, often a joke in PvP, is known as bubble-hearthing. Other players who manage to go untouched during combat can also use their hearthstone to flee a dangerous situation.
Shamans have an ability Astral Recall that is identical to the hearthstone, and shares the same home point, but has only a 15-minute cooldown that is not linked to the hearthstone's cooldown. There is also an item that drops in Karazhan, Ruby Slippers, that will also trigger the same effect as the hearthstone.
There are some events in the game that can also result in your hearthstone cooldown being used. If a player becomes stuck, the first tool for assistance in the Request Help menu is a feature called Unstuck that will hearth the player and also report their location to Blizzard to fix. Also, if a player enters an instance and then becomes no longer part of a group, there is the possibility the game may try to evict the player by sending them to their home point. Some players do this intentionally with The Stockades or Ragefire Chasm to return to Outland, and call this technique the Ghetto Hearth. While this still resets the cooldown to 60 minutes, it will return the player to their home point.
If you lose or accidentally destroy your hearthstone, you can get a new one by talking to any innkeeper and using the "Make this inn my home" option. This will both make the inn your home and restore a new hearthstone to your bags.