Knowing when to use 'a' or 'the' can be difficult. Fortunately, there are rules to help you, but you need to know what type of noun you are using.
When you have a single, countable noun, you must always have an article before it. We cannot say "please pass me pen", we must say "please pass me the pen" or "please pass me a pen" or "please pass me your pen".
Nouns can also be uncountable. Uncountable nouns can be concepts, such as 'life', 'happiness' and so on, or materials and substances, such as 'coffee', or 'wood'.
Uncountable nouns don't use 'a' or 'an'. This is because you can't count them. For example, advice is an uncountable noun. You can't say "he gave me an advice", but you can say "he gave me some advice", or "he gave me a piece of advice".
Some nouns can be both countable and uncountable. For example, we say "coffee" meaning the product, but we say "a coffee" when asking for one cup of coffee.
You can use 'the' to make general things specific. You can use 'the' with any type of noun - plural or singular, countable or uncountable.
"Please pass me a pen" - any pen.
"Please pass me the pen" - the one that we can both see.
"Children grow up quickly" - children in general.
"The children I know grow up quickly" - not all children, just the ones I know.
"Poetry can be beautiful"- poetry in general.
"The poetry of Hopkins is beautiful" - I'm only talking about the poetry Hopkins wrote.
Rivers, mountain ranges, seas, oceans and geographic areas all use 'the'.
For example, "The Thames", "The Alps", "The Atlantic Ocean", "The Middle East".
Unique things have 'the'.
For example, "the sun", "the moon".
Some institutional buildings don't have an article if you visit them for the reason these buildings exist. But if you go to the building for another reason, you must use 'the'.
"Her husband is in prison." (He's a prisoner.)
"She goes to the prison to see him once a month."
"My son is in school." (He's a student.)
"I'm going to the school to see the head master."
"She's in hospital at the moment." (She's ill.)
"Her husband goes to the hospital to see her every afternoon."
Musical instruments use 'the'.
"She plays the piano."
Sports don't have an article.
"He plays football."
Illnesses don't have an article.
"He's got appendicitis."
But we say "a cold" and "a headache".
Jobs use 'a'.
"I'm a teacher."
We don't use 'a' if the country is singular. "He lives in England." But if the country's name has a "plural" meaning, we use 'the'. "The People's Republic of China", "TheNetherlands", "The United States of America".
Continents, towns and streets don't have an article.
"Africa", "New York", "Church Street".
Theatres, cinemas and hotels have 'the'.
"The Odeon", "The Almeira", "The Hilton".
Abbreviations use 'the'.
"the UN", "the USA", "the IMF".
We use 'the' before classes of people.
"the rich", "the poor", "the British".