"An" is used when the H is silent such as "an hour".

"A" is used when the H is verbal such as "a hero".

Unless you pronounce "hero" "ear-o" then you should use "A" instead of "An".  Personally I pronounce "hero" as "Here-o" and so do most people I encounter. 