EnglishWithLatini.com
If a word that follows starts with a vowel sound you need "an".
Please hand me an apple.
You're going to need an X-ray.
Although "x-ray starts with an X, it starts with a vowel sound, it sounds like an "e" as in "every".
If the word that follows starts with a consonant sound, you need "a".
I need a pencil.
This is a very important lesson.
More examples:
He has a brother and an older sister.
We got into an argument yesterday.
He' an honorable man.