Here's why:
* "H" can have a silent sound: Words like "hour", "honor", and "honest" start with an "h" but the "h" is silent. In these cases, you use an because the first sound is a vowel.
* "H" can have a pronounced sound: Words like "hat", "house", and "happy" start with a pronounced "h" sound. In these cases, you use a.
Examples:
* An hour
* An honor
* A hat
* A house
Let me know if you have any other grammar questions!