A is the first letter of the English alphabet, and it is a vowel of which there are only five. If you achieve an A in school, you have been correct by 100%. It is a function word that is used before a noun to describe it as a singular item.
The A covers many parts of speech, such as the article would be “a man fell,” preposition, verb, abbreviation, prefix, and the symbol for Argon in the periodic table. The word is also an article and is always used before a word beginning with a vowel.
Both a and an are used in the same way with the exception that A is used before a word starting with a consonant and a would be used before a word that begins with a vowel.