"A" and "An" are INDEFINITE articles. You use them when you are talking about a non-specific thing. "A house," for example. This could be any house. "I'd like to buy a house this year."
-- "A" and "An" mean the same thing. The only difference is that they are used to clarify pronunciation. "A" is used when the next word in the sentence begins with a CONSONANT. "An" is used when the next word in the sentence begins with a VOWEL. (A, E, I, O, U)
A cat, A dog, A bed, A good idea, A rainy day, A house, A yellow flower
An idea, An awful day, An unmade bed, An ugly cat, An academy, An orange flower, An open book
Sometimes a word starts with a vowel, but it is actually pronounced like a consonant. In this case, you would use "A" instead.
A unique house, A ukelele (a musical instrument). In both of these, the "U" is pronounced like the letter "Y."
Sometimes a word starts with a consonant, but it is actually pronounced like a vowel, so you would use "An" instead.
Words that begin with "H" are tricky, because depending on the speaker's accent, he might pronounce the "H," or not. This means that some people pronounce it like "hurb," and some people pronounce it like "urb." I think that "urb" is more common. However, if you pronounced it "hurb," you would say "A herb."
"The" is a DEFINITE article. You use it when you are talking about a specific thing. "The house," meaning the house you are talking about or looking at. "I'd like to buy the yellow house next door."
It is written the same no matter what the next word is. Sometimes people pronounce it differently, following the same rules as above. If the next word starts with a consonant, it is pronounced "the." If the next word is a vowel, it is pronounced "thee." Again, though, it is written the same. "The cat," "The ugly cat," "The idea," "The good idea," "the yellow flower," "the orange flower."