When do you put the word 'an' in front of a word?

You put the article "an" in front of a word (instead of "a") when the word begins with a vowel sound, including some words that start with consonants (hour, honor).

Words that begin with a vowel having a consonant sound such as "you" (euphemism, use) would still use the article "a" as when spoken.
E.g. a uniform, a unicorn