The rule is simple: You use a before a consonant sound and an before a vowel sound.
He wanted a Mercedes-Benz for his birthday. She gave him an Acura instead.
When a word begins with the letter H, if the H is sounded, use a. If it's silent, use an.
When she was bad, she was a horrible girl. Congress considered Vice President Ford an honorable man.
The same rule applies to acronyms: If the sound that begins the acronym is a consonant sound when you say it, use a. If it's a vowel sound when you say it, use an.
Sam was a CIA agent, and Linda was an FBI profiler. Jeff is a UAW steward at the auto plant. Shirley is an NAACP member.