“A” or “An” are indefinite articles. They are used with singular nouns whose specific identity is not known to the reader.
A—“A” is used before a singular noun that begins with a consonant.
Examples: a dog, a cow, a person, a lamp
Exception: Some nouns begin with vowels (a,e,i,o,u), but sound like they begin with consonant: “A” is used with these words.
Examples: a unicorn (pronounced “yoo-nicorn,” a one-dollar bill (pronounced “won-dollar”)
AN—“An” is used before a singular noun that begins with a vowel.
Examples: an elephant, an igloo, an octagon
Exception: “An” is also used with a few singular nouns that begin with a consonant.
Examples: an herb, an honorarium (silent ‘h’), an X-ray technician (pronounced “ex-ray”).
There are many more exceptions to these guidelines. If you are in doubt, it is generally safer to use an article with a singular noun than to leave it out. Also, try reading the sentence aloud to yourself or to a friend. It is often easier to hear mistakes than to see them.