Whether you use 'a' or 'an' depends on the pronunciation of the first syllable of the word.
'A utility' because the first syllable of the word is pronounced 'you'. Since 'y' is not a vowel, you have to use 'a'.
Similarly, a unicorn, a uniform, a university.