Heroes, the most important unit of the game. Everyone hates them. They are huge really powerful units that often bolster the armies around them with useful auras. This article talks about how to get rid of them, and how to protect you hero from similar dangers. Note that you can obviously just swarm the enemy hero with tons of units. I will talk about the more subtle and more powerful methods. My usual disclaimer: If anything doesn't work, don't blame me.
The Undead have several options for hero killing, though they are not built for it.
Dreadlord and Sleep: A simple, and common tactic. Put the enemy hero to sleep and surround it, before attacking. To avoid losing your hero to this strategy, surround your hero with units. You can also town portal back to base. Heros that are running back to base on there own are VERY vulnerable.
Necromancers and Melee: Necromancers can Cripple a hero to slow the hero down and then provide cover while the melee attack the hero. Skeletons will be popping up everywhere, disrupting the enemy attacks. To evade death of your hero, use a wand of Negation to help get rid of the skeletons, and anything that can remove magic (i.e. Dispel Magic) to avoid Cripple.
Humans are very adept at hero killing, though not the best...
Sorceresses: This is a simple one. The Sorceress's Polymorph all of the units surrounding the hero. Then, they simply slow the hero and attack. To protect your hero, Dryads/Priests can be used, as they can remove the slow from the hero, and unpolymorph their comrades.
Mountain King and Melee or Ranged Support: A simple one, again. Hurl a Storm Bolt at your enemy hero and close in with the melee (or attack with the ranged units), destroying the stunned hero before he can run for it. To avoid this, keep your hero closely guarded, make sure he isn't separate from the fray.
Paladin: Divine shield makes him invincible. An excellent opportunity to prey on a weakened hero. Not much that you can do to stop it, just run away with your hero and send a few units after him, for when the shield wears off.
The second best hero killers, lots of options here.
Blademaster: Windwalk and sneak behind enemy lines, you may even want to use mirror image so that it seems you are still fighting. Then just go 1v1 with their hero. Unless they are a lot bigger than you, you should be able to finish them off. Again, not much you can do. Pull back your army to help your hero after you confirm that you are being attacked by the real Blademaster.
Shamans: Shamans can purge a hero and then increase the damage they do with a Bloodlust. It will end up dealing a ton of damage to a slow unit. To avoid death here, get Dryads/Priests and keep your hero at the back and attack with whatever you have.
Tauren Chieftain and Melee or Ranged Support: One of the hardest heros to kill himself, he can use his War Stomp ability to stun a target, while he continues to hack. The melee then comes in to help or range units can shoot over his head. This is hard to counter, as the Tauren Chieftain deals a lot of damage and is hard to kill. Run as soon as you can, and focus your army on the Chieftain.
Raiders and Ensnare: Raiders can Ensnare an enemy hero and then attack the hero while he/she is imprisoned. Not a bad combo... Removing the net with some form of Dispel Magic should work. You might also, again, surround your hero with units.
Wyverns: Wyverns with Envenomed Weapons deal immense damage that continues over time. To stop them, get anti air (rifles, headhunters, archers, crypt fiends), though it may not work soon enough, as Wyverns are very sturdy and will take a lot to destroy. You can also remove the poison with an antimagic spell (i.e. Abolish Magic), though it will return every time the hero is hit by a Wyvern.
The Night Elves are the best hero killers. They have many powerful options, and they are hard to stop.
Keeper of the Grove, Entangling Roots, and Support Units: The Keeper Entangles a hero and everyone gangs up on him. Simple, easy, hard to deal with. To keep yourself alive, protect you hero and kill the support units, as the Keeper doesn't do too much damage. Also, if this has happened previously in a game and you suspect they will do it again, attack the Keeper before he casts the spell and try to kill him.
Dryads and Priestess of the Moon (optional): The Priestess of the Moon just increases the attack power of the Dryads. The Dryads simply focus on the hero. The Slow Poison will deal damage for a while after the attack has stopped, as well as slowing the hero immensely. When countering this be careful, as Abolish/Dispel Magic doesn't work here, so instead, use melee to rip up the relatively weak Dryads.
Druid of the Talon and Hippogryph Riders or Chimaeras: The Druid of the Talon casts Faerie Fire, greatly decreasing the hero's armor. At this point, swarm the hero with the flying Chimaeras or Hippogryph Riders (better, in my opinion, due to the range). To prevent death, get your hero away ASAP and take out the Riders or Chimaeras first. You can use Abolish/Dispel Magic to remove the Faerie Fire.
Demon Hunter: Mana Burn can do considerable damage to nearby heros, especially when they are weakened after a long battle. The only way to avoid this is to use up mana fast and stay away from the Demon Hunter.
That's all there is to hero killing. I may not have covered every way, but I think I touched on most. Remember, try these strategies at your own risk, and don't blame me when they go wrong. Good luck!