Distinction between a and an
The form an is used before words starting with a vowel sound, regardless of whether the word begins with a vowel letter. This avoids the glottal stop (momentary silent pause) that would otherwise be required between a and a following vowel sound. Where the next word begins with a consonant sound, a is used. Examples: a box; an apple; an SSO (pronounced "es-es-oh"); a HEPA filter (HEPA is pronounced as a word rather than as letters); an hour (the h is silent); a one-armed bandit (pronounced "won..."); an heir (pronounced "air"); a unicorn (pronounced "yoo-"); an herb in American English (where the h is silent), but a herb in British English.
Some speakers and writers use an before a word beginning with the sound /h/ in an unstressed syllable: an historical novel, an hotel. However this usage is now rare. Merriam-Webster's Dictionary of English Usage allows both forms a historic and an historic.
Some dialects, particularly in England (such as Cockney), silence many or all initial h sounds (h-dropping), and so employ an in situations where it would not be used in the standard language, like an 'elmet (standard English: a helmet).