A, an and the are associated with nouns. Problems sometimes occur when modifiers intervene between the article and the noun, but articles constitute the finer points in English and are especially problematic for non-native speakers. Some basic rules follow.
Use a or an with singular count nouns whose specific identity is not known. Count nouns refer to persons, places or things that can be counted. Ex. one girl = a girl; one city = a city; one orange = an orange.
A is used before a consonant. An is used before a vowel or words that begin with consonants that are silent. Ex. heir, hour, etc.
Noncount nouns do not use a or an before them. Noncount nouns are abstract nouns; food and drink; nonfood substances; areas of study; and other miscellaneous items. Ex. poverty, happiness, information, intelligence, knowledge, advice, anger, bacon, ice cream, milk, pasta, air, rain, snow, gasoline, paper, wood, wool, etc.
You would never say "I would like a bacon." You would say "I would like bacon" or "I would like some bacon." To make noncount nouns more specific, use a qualifier which will take an article. For example, "Please give me a bottle of water." Bottle is the qualifier that specifies an amount. Another example is "I need a pound of butter for the recipe." Another example is the sentence "He wants to buy some milk," which does not take an article, but "He wants a glass of milk" requires the article before "glass." While many of these categories hold, there are, as is typical in English, exceptions and fine distinctions.
Use the with specific nouns that are identified or known. With superlative forms that make a noun's identity specific, such as "best" or "most intelligent," the superlative form limits or restricts to the specific identity of the noun and requires the as the article. Ex. "He is the best student in the class." "She is the prettiest girl I know."
Another use of the is with nouns that describe a unique person, place or thing. The key with articles is to recognize the noun involved first.