The English article used before words beginning with a vowel sound, as in “apple,” is “an.” The choice depends on pronunciation, not simply on the first written letter: we say “an apple,” “an hour,” and “an honest person” because each begins with a vowel sound. Conversely, “a university” and “a European country” use “a” because they begin with a consonant-like “y” sound.
“An” is the indefinite article, meaning that the speaker is referring to one nonspecific member of a group. In “I ate an apple,” the apple is not previously identified. The related article “the” is definite and points to a particular thing, as in “the apple on the table.”
English inherited its articles from older Germanic demonstrative and numeral words. The form “an” developed alongside “a,” with the final consonant helping separate the article from a following vowel sound. In rapid speech, this distinction improves pronunciation and prevents awkward vowel-to-vowel transitions.