A or An are used before nouns to talk about something the listener or reader does not know about.
I have a problem. Do you know what it is?
• I was born in a town.
(The reader doesn’t know which town and no vowel sound so, a)
• They are a company which sells chocolate.
(lots of companies sell chocolate so the listener doesn’t know which company is being talked about and no vowel sound so, a)
• I want to buy an umbrella.
(There are lots of umbrellas to buy, but we don’t know which one. Here there is a vowel sound so we use an)