When should you use "a" and when should you use "an"?

In English there are two indefinite articles, a and an.
A is used when we refer to a word starting with a consonant sound, e.g. a doctor, a car, a marriage, a woman.
An is used when we refer to a word which starts with a vowel sound, e.g. an apple, an eagle, an octopus.
It is important to note that many words which start with a consonant letter may actually start with a vowel sound, and some words that start with a vowel letter may start with a consonant sound. For example, when a word starts with a silent h, it generally starts with a vowel sound, e.g. hour, heir, honest.
Words that start with a vowel letter but a consonant sound tend to be acronyms where the letters are pronounced individually, e.g. UFO: because U is pronounced as yew on its own, it takes the indefinite article a.
Examples of a in a sentence
A Novel- Seeing Stars by Diane Hammond
RUTH RABINOWITZ HAD A WAKING NIGHTMARE THAT SHE had hit…- Seeing Stars by Diane Hammond
AS RUTH UNDERSTOOD IT, THERE EXISTED A DICHOTOMY of opinions…- Seeing Stars by Diane Hammond
IN FACT, WHAT CAME NEXT WAS A CHECK FOR $995,…- Seeing Stars by Diane Hammond
Examples of an in a sentence
HUGH’S ALASKA AIRLINES FLIGHT A WEEK LATER WAS HALF an…- Seeing Stars by Diane Hammond
Never be late for an audition.- Seeing Stars by Diane Hammond
She’ll still have an ethnic look, but she’ll be able to play Arab, Jew, gypsy, whatever.- Seeing Stars by Diane Hammond
Her mother rose, put an arm around her, and gently led her away.- Seeing Stars by Diane Hammond