Usually you use "an" when the following word begins with a vowel.
Example: an apple, an umbrella.
Edit: an apple, an egg, an indian, an orange, an umbrella.

But "university" is an exception. ...