The key thing here is the word SOUND. It's all about vowel SOUNDS, not letters.
For example, the letter 'u' sometimes has a vowel sound, for example
an umbrella
an urgent phone call
But sometimes, the letter 'u' is pronounced with a consonant sound, like a 'y'
a university
a uniform
It's the same with the letter 'h'. Sometimes it's a consonant sound:
a hat
a hamburger
But sometimes it's silent, which makes the word begin with a vowel sound:
an hour
an honour
Remember - it's all about the sound, not the spelling.