Here's why:
* "An" is used before words that start with a vowel sound:
* Example: an apple, an hour, an umbrella (the "h" in "hour" and "umbrella" is silent, so the sound starts with a vowel)
* "A" is used before words that start with a consonant sound:
* Example: a cat, a book, a tree
Important:
It's the sound of the first letter, not the letter itself, that determines whether to use "a" or "an."