floyder is correct, but it has more to do with a vowel sound and not just beginning with a vowel. You would say "an hour" or "an SMS" because the 'h' and 's' make a vowel sound (a/o and e.) Similarly, you would say "a UFO" because the U here makes a 'y' sound
I hope I didn't make this seem too complicated :)