Just to add to Ruthi's answer:
The rule is a little more complicated than simply using 'a' before consonants (b,c, d etc) and 'an' before vowels ( a e i o u).
It's important to understand that the article you need depends on the SOUND of the beginning of the word, not the spelling. So there are some exceptions to the simple vowel/consonant distinction:
Some words with an initial 'h' ( a consonant) actually begin with a vowel sound, because the 'h' is silent. So while we say
we also say
an honest man.
This is because the 'h' is not pronounced in the above words. Some people also say 'an historic event' and 'an hotel', and US English (only) says 'an herb', but the 'an' is optional in these words. For 'hour' and words based on the root of 'honour' and 'honest', though, you do have to use 'an'. It is incorrect to say ' a hour' or 'a honour'.
Likewise, there are also some words beginning with 'u' ( a vowel) which need the article 'an' before them. So while we say
an unusual person
we also say
a universal right
This is because words beginning with the prefix 'uni' are actually pronounced with a consonant sound (like 'you').
It's also worth remembering that the article before initials and acronyms depend on the 'name' of the letter, not the sound of the letter.
So, for example, we would say 'I'm going to study for an MBA', not 'a MBA'. This is because 'MBA' is pronounced 'Em - bee - ay'. 'Em' is a 'word' beginning with a vowel, so you need to use 'an', not 'a' before it. Likewise, you would say 'a US president', not 'an', because 'US' is pronounced 'you-ess'.