Heroes aren't killed, they're captured. If your hero is part of a losing battle against another city or valley, your hero sometimes gets captured, which means you lose him or her forever. If it's against another player, though, and they capture the hero, then they have the option of paying a certain amount of gold and can then take your hero for themselves.
If you have been plundering valleys, and you have an empty space in your feasting hall, you may notice that you obtain a captive hero sometimes. This means that you're capturing the hero in the valley. These heroes are just random, so chances are their stats are pretty crappy. Just treat this like you would treat a hero in the inn... look him over, and if he has stats you like, click "persuade" and you'll be asked to pay a certain amount of gold to hire him for your own. If you don't like him (and chances are you wont) just click "release" and he'll disappear.
You can also capture enemies heros, if you have a free space in your feastinghall. Those heros are often better than the ones you find in a valley