Hero is one of the main gameplay concepts in Heroes of Might and Magic games.
Througout installments heroes were implemented differently.
In first three installments heroes symbolised army on map. A hero couldn't walk around without an army (though this could happen under some relatively rare circumstances), if a hero loses his army in combat, he dies. In third installment different heroes could have some boost over various units, spells or skills. Heroes didn't take part in main combat, they could only cast spells.
Fourth installment introduced different concept of heroes: now player's army could walk without a hero and single hero could walk freely without any army. Also heroes acted in combat alongside with other units, could be killed and had to be ressurected in towns. Heroes didn't have any specialisations and difference between heroes of the same class was only hero's portrait and biography.