By Marina Pantcheva
The form a is used before a word that starts with a consonant sound, such as /b/, /d/, /m/, /r/, /w/.
The form an is used before a word that starts with a vowel sound, such as /a/, /e/, /i/, /o/, /u/.
What matters for the choice between a and an is the pronunciation of the word, not the initial letter in the written form of the word. It is therefore useful to read the word aloud when deciding between the two forms. In fact, words spelled with the same initial letter may take different forms due to the different pronunciation. For instance, we say an hour (hour is pronounced with an initial /a/), but a hotel (hotel is pronounced with /h/). Similarly, we say an ominous silence, but a one-to-one meeting (one is pronounced as /wan/).
Note that the sounds /w/ (as in warm and one) and /j/ (as in you and union) are consonant sounds. Therefore, we say a union, a youngster (but an unknown soldier).
The same rules hold of abbreviations – it is correct to say an FBI agent, as FBI is pronounced /ef-bi-ai/, thus starting with the vowel /e/; but a US intervention, as US is pronounced /ju-es/.