Use 'a' with nouns starting with a consonant (letters that are not vowels),
'an' with nouns starting with a vowel (a,e,i,o,u)
Examples:
A boy
An apple
A car
An orange
A house
An opera
NOTE:
An before an h mute - an hour, an honour.
A before u and eu when they sound like 'you': a european, a university, a unit
The indefinite article is used:
to refer to something for the first time:
An elephant and a mouse fell in love.
Would you like a drink?
I've finally got a good job.
to refer to a particular member of a group or class
Examples:
with names of jobs:
John is a doctor.
Mary is training to be an engineer.
He wants to be a dancer.
with nationalities and religions:
John is an Englishman.
Kate is a Catholic.
with musical instruments:
Sherlock Holmes was playing a violin when the visitor arrived.
(BUT to describe the activity we say "He plays the violin.")
with names of days:
I was born on a Thursday
to refer to a kind of, or example of something:
the mouse had a tiny nose
the elephant had a long trunk
it was a very strange car
with singular nouns, after the words 'what' and 'such':
What a shame!
She's such a beautiful girl.
meaning 'one', referring to a single object or person:
I'd like an orange and two lemons please.
The burglar took a diamond necklace and a valuable painting.
Notice also that we usually say a hundred, a thousand, a million.
NOTE: that we use 'one' to add emphasis or to contrast with other numbers:
I don't know one person who likes eating elephant meat.
We've got six computers but only one printer.