Ok, so i'm very new to this blogging thing and perhaps just trying to fill space... :-)
The Rule
The rule states that “a” should be used before words that begin with consonants (e.g., b, c ,d) while “an” should be used before words that begin with vowels (e.g., a,e,i). Notice, however, that the usage is determined by the pronunciation and not by the spelling, as many people wrongly assume.
You should say, therefore, “an hour” (because hour begins with a vowel sound) and “a history” (because history begins with a consonant sound).
Similarly you should say “a union” even if union begins with a “u.” That is because the pronunciation begins with “yu”, which is a consonant sound.