The number one rule is this: if a word is countable (e.g. one book, two books), you must always use an article (or my, his, etc.):
I read a book. √
I read book.
This is true even if there are adjectives before the noun:
He drives an old car. √
He drives old car.
Never use a or an with a word that is plural (e.g. books, trees) or uncountable (e.g. water, advice):
I asked her for advice. √
I asked her for an advice.
Note that we use a in front of words that start with a consonant sound (a horse, a carrot) and an in front of words with a vowel sound (an apple, an elephant).
The next most important thing to understand is the difference between a/an and the. Basically, we use a/an when we don’t need to say which thing we are talking about. We use the to talk about a specific thing:
I caught a train to London. (it doesn’t matter which train)
The train was late. (that particular train was late)
We often use a when we mention something for the first time, and then change to the when it is clear which thing we are talking about:
He was talking to a man. The man was laughing.
She gave him a present. The present was very expensive.
We also use the when it is obvious which thing we are talking about or when there is only one of something:
Could you shut the door, please?
I cleaned the bathroom this morning.
He travelled around the world.
The sun is hot today.
If you stick to the rules above, you will be correct in almost all cases. However, there are a few exceptions, and the following are the most useful ones to learn:
We don’t use a/an before the names of meals:
We had lunch at noon.
We don’t use a/an before words like school, prison, or college when we are talking about them in a general way:
I hope to go to college.
He spent three years in prison.
My brother’s in hospital (UK) / in the hospital (US).
We use the before the names of shops or places where we go for services when they are the ones we usually go to:
I need to go to the supermarket.
She went to the doctor’s.