"We eat an apple."
Translation:Wir essen einen Apfel.
It's because in German, many nouns change form depending on their position in the sentence - this is called case. (The English equivalent is the difference between using "he" and "him" or "she" and "her". We have lost this with nouns.) Apfel is masculine - ein Apfel - but since in the sentence it is the object of the verb, it goes into the accusative case, thus einen. (If you google "german articles" you'll get a wikipedia entry with a chart.) And yes, this is a really hard thing to learn the duolingo route!
Use "den" when the question asks for "the" and the direct object is masculine and singular.
Use "einen" when the question asks for "a" and the direct object is masculine and singular.
the apple = der Apfel, the apple (direct object) = den Apfel
an apple = ein Apfel, an apple (direct object) = einen Apfel.
Definite article means a specific object is discussed. In English the definite article is "the."
For example, if there's an apple on the table and it was gone ten minutes later, I would ask "where is the apple" because I want to know what happened to the apple on the table. I want to know what happened to a specific object.
If I asked "where is an apple," I would be asking where I can find any odd apple. Apple is non-specific in this case and the English article for indefinite nouns are a or an.