The words a or an and the are called articles. Articles come before nouns.
There are two articles - a/an and the
The article a or an is called the indefinite article because it doesn’t state which person or thing we are talking about.
- For example, a doctor means any doctor.
- A child means any child.
The article the is called the definite article because it points out a particular person or thing.
- You must consult the doctor. (Which doctor? It could be your family doctor.)
- You must consult a doctor. (Which doctor? It could be any doctor. Here the speaker does not have a particular doctor in mind.)
The indefinite article (a/an) is used before singular countable nouns. It cannot be used before plural nouns.
- We can say an apple or a tree, but not an apples or a trees.
The definite article (the) can be used before singular countable nouns, plural countable nouns and uncountable nouns.
- We can say, the book, the books, the rice or the milk.
A or an
The choice between a and an is determined by sound and not spelling. A is used before words beginning with a consonant sound. Examples are: a boy, a tree, a ball, a flower, a horse, a hole, a European and a university.
An is used before words beginning with a vowel sound. Examples are: an elephant, an egg, an orange, an umbrella, an hour, an heir etc.
Note that some native speakers use an before words beginning with h if the first syllable is not stressed.