Incorrect usage of ‘a’ and ‘an’ is one of the things that will mark you as a poor writer. Although some uses are obvious to most native English speakers, there are (as with so many other grammar rules) exceptions to the usual rules.
Most people know to use ‘a’ before a word beginning with a consonant and ‘an’ before a word beginning with a vowel:
The sandwich was served with a salad and an apple.
Simple, right? Most of the time. But here are some exceptions.
Use ‘an’ with words that begin with a silent ‘h.’ Words such as hour, honest, honor and (in American English) herb begin with an ‘h’ but the ‘h’ is not pronounced.
Incorrect: I waited a hour for the rental agent to arrive.
Correct: I waited an hour for the rental agent to arrive.
Use ‘a’ with words that begin with a ‘u’ that sounds like ‘you.’
Incorrect: An used towel was on the floor.
Correct: A used towel was on the floor.
Use ‘a’ with words that begin with an ‘o’ that sounds like ‘w.’
Incorrect: The hostess said there would be an one-hour wait.
Correct: The hostess said there would be a one-hour wait.
The bottom line? The choice of ‘a’ or ‘an’ is determined by the sound of the word, not the spelling. If the word begins with a consonant sound, use ‘a.’ If it begins with a vowel sound, use ‘an.’