For the usage of "a" or "an", what really matters is the first SOUND of the following noun.
We say: a car, a pen, a man. The sounds following "a" are consonant sounds.
So: an elephant, an animal, an umbrella. In this case, the initial sounds after "an" are vowel sounds. We say an umbrella,...