In English, »a« is used as the indefinite article before all words that begin with a consonant sound. If a word begins with a vowel sound, then »an« is used as the indefinite article.
It is important to remember that it is the type of »sound« used when speaking a word that determines whether »a« or »an« should be used. Some words that are written with an initial consonant have a vowel sound. Other words written with an initial vowel have a consonant sound.
Because the sound is the determining factor, some words may take different indefinite articles according to their pronunciation in British English, American English, or various dialects.