a/an is used:
A Before a singular noun which is countable (i.e. of which there is more than one) when it is mentioned for the first time and represents no particular person or thing:
I need a visa. They live in a flat. He bought an ice-cream.
B Before a singular countable noun which is used as an example of a class of things:
A car must be insured =
All cars/Any car must be insured.
A child needs love =
All children need/Any child needs love.
C With a noun complement. This includes names of professions:
It was an earthquake. She’ll be a dancer. He is an actor.
D In certain expressions of quantity:
a lot of a couple
a great many a dozen (but one dozen is also possible)
a great deal of
1 Articles etc.
E With certain numbers:
a hundred a thousand
Before half when half follows a whole number:
11/2 kilos = one and a half kilos or a kilo and a half
But 1/2 kg = half a kilo (no a before half), though a + half + noun is sometimes possible:
a half-holiday a half-portion a half-share
With 1/3, 1/4, 1/5 etc. a is usual: a third, a quarter etc., but one is also possible.
F In expressions of price, speed, ratio etc.:
5p a kilo £1 a metre sixty kilometres an hour
10p a dozen four times a day
(Here a/an = per. )
G In exclamations before singular, countable nouns:
Such a long queue! What a pretty girl! But
Such long queues! What pretty girls!