Leashing is the primary means for players escaping combat. From an early level, all players learn that if you run from a mob in one direction for long enough, the mob will break off combat and reset. However, hitting a mob seems to reset the leash range. One way to pull a mob to a far off location is to periodically attack it (for example, walking backwards while meleeing it) to keep its attention.
Leashing is also one way to prevent training, in the sense of griefing somebody by luring mobs onto them. (Since the mob will be in evade mode while returning to its spawn, and will not aggro on anyone it runs past.)
For boss mobs, particularly raid encounters, leashing is triggered in a slightly different way. Some boss mobs are intended to be fought in a certain area. If the boss is pulled outside of that area, it will automatically leash (clearing aggro and returning to its spawn in evade mode as above), regardless of how recently it has been hit. Note that there are many bosses who either do not leash or are fought in an area where escape is impossible.
Most of the priests in Zul'Gurub (with the exception of Arlokk the Panther and Bloodlord Mandokir), can be leashed. If a pull is bad or the fight goes awry, it is a common strategy to simply have the remaining people run out of the area. Hakkar will then tell the priest to "not be lured into the mortals' trap," and the boss will reset. This strategy has been known to glitch however. Thekal once continued chasing raid members around the entire instance despite being told to go back home four times by Hakkar. He was persistent enough to swim through rivers, cross bridges, dash up hills, and even go into Arlokk's temple seeking out every last raid member and cutting them down.
Non-boss mobs in instances generally do not leash. The only way to escape them is to exit the instance, or to use an aggro-clearing ability like the hunter's feign death.