They are called articles.....
AN is used before a word which starts with a vowel(a,e,i,o,u) example an egg.......
A is used before a word that starts with consonants example a cow, a boy.
We use THE before special things example The moon, The sun, The U. K etc