Use of the Indefinite Article

The indefinite article (a/an) is used before a noun in the following cases:
a) To convey the numerical sense of one

I have a pen.
There is a cat on the roof.
A hundred kilos make a quintal.

A thing of beauty is a joy for ever.

b) Before a noun representing a whole class

A spider has eight legs.
A cow is a domestic animal.
A tree gives shade.
A teacher must have patience.
A doctor must like people.

c) To talk about a particular person or thing when the listener or reader does not know which person or thing is meant.

She married a rich businessman.
We live in a big city.
I saw a child in the toy store.
A man knocked at the door.

Cases where the indefinite article should not be used

With plural and uncountable nouns
The indefinite article cannot be used before uncountable or plural nouns.

Wisdom is better than riches. (NOT A Wisdom is better than riches.)
 Apples are red. (NOT An apples are red.)
Computers are useful.
Water is precious.
Time is money.

With possessives
The indefinite article cannot be used with possessives. We use double possessives instead.

He is a friend of mine. (NOT He is a my friend.)

With adjectives without nouns
The indefinite article cannot be used with an adjective standing alone without a noun.

He is a clever boy.
He is clever. (NOT He is a clever.)

A and An – Differences
A is used before a word beginning with a consonant sound. Examples are: a horse, a cat, a European, a hole, a useless object, a university, a dog, a cat etc.

An is used before a word beginning with a vowel sound. Examples are: an egg, an elephant, an honest man, an animal, an hour etc.

Notes
Before the words historical and hotel, both a and an are used, though the more common practice is to use ‘an’, as the first syllables ‘his’ and ‘hou’ are considered unaccented.
 
An historical building/place/event

However, more recently the trend has been to pronounce these words with accented first syllables. Hence, according to the more recent trend, ‘a’ should be used before these words.

A historical building/place/event
A hotel