Use of the articles in english

For the sake of convenience, many teachers tell their students that the indefinite article a is used before consonants, while an is used before vowels. In most cases, this is true:
A cat An apple
A dog An elephant
A house An ice-cream
A man An orange
A woman An umbrella

However, the choice between a and an actually depends on pronunciation, not spelling. Thus, a is used before a consonant sound, even if it is written as a vowel, and an is used before a vowel sound, even if it is written as a consonant:
A uniform
A one-sided game
An hour
An NCO

Some people say an, not a, before words beginning with h when the first syllable is not stressed:
An hotel (a hotel is more common)
An historical novel (a historical … is more common)

When an abbreviation takes an article, it depends on the pronunciation of the first letter of the abbreviation:
An NCO
A UN spokesman.

For more information, and quizzes, on a and an, see the following web sites:
http://www.andromeda.rutgers.edu/~jlynch/Writing/a.html#a
http://www.rhlschool.com/eng2n26.htm

The information about a and an above is directly relevant to the pronunciation of the definite article, the.

This word has two pronunciations, depending on whether it comes before a consonant sound or a vowel sound.

The is pronounced before a vowel sound, even if it is written as a consonant, and before a consonant sound, even if it is written as a vowel:
The (Consonant sound) university is in the middle of town.
The (Consonant sound) one-way street near my house is closed.
The (Vowel sound) honest answer to your question is “No”.
The (Vowel sound) FBI is investigating the case.

The same applies for abbreviations as for a and an (see above). Acronyms (words formed from the intital letters of a group of words), should be treated as words, and not abbreviations:
the Consonant sound SALT treaties
the Consonant sound RAM on my computer