I think de is for masculine and feminine nouns while het is for neuters. So I guess appel is masculine or feminine.
(As I understand it, masc. and fem. have partly merged, and the distinction between them isn't crucial - leaving m/f versus neuter as the important distinction).
Appel as in the fruit is of masculine gender.
- de appel - "the apple" [fruit/food]
However there is a form of appel that is neuter:
- het appel - "the appeal"
This form is often found within Judicial/Legal contexts and 'protests':
de jury van appel - "the appeal jury" [judicial/legal]
een appel voor hands - "an appeal for hands" [sport/voetbal]
Die hond is onder appel. - "That dog is well-trained." [idiom]
This Dutch course that Duo is offering highlights Standard Dutch -- as used around Holland. There are many dialects. In Belgium, and some dialects in the southern part of The Netherlands, differentiation between masculine and feminine gendered words is still exercised.
In Standard Dutch, and many dialects, there has been a reduction to two grammatical gender groups for nouns: common gender (masculine feminine) and neuter gender.
However since there are only two definite articles used (i.e de, het) -- determining whether a noun is masculine or feminine is not that important these days. The primary area where one might see differentiation, and the practice of recognizing three grammatical genders is in pronouns. See below for examples:
de appel (masculine) - the apple
de taart (feminine) - the cake
het horloge (neuter) - the watch
- Hoeveel kost deze appel? -- Hij kost twee euro.
"How much does this apple cost?" -- "It costs two euros."
- Hoeveel kost deze taart? -- Zij kost vier euro.
"How much does this cake cost?" -- "It costs four euros."
- Hoeveel kost dit horloge? -- Het kost dertig euro.
"How much does this watch cost?" -- "It costs thirty euros."
In Standard Dutch and many dialects you can quite commonly see Hij used even if a noun is technically feminine:
Hoeveel kost deze appel? -- Hij kost twee euro.
Hoeveel kost deze taart? -- Hij kost vier euro.
There isn't any sure way to tell if it should be 'de' of 'het'. You have to learn for every single object of it should be 'de' of 'het'. We Dutch do it on a basis of feeling I guess. And many get it wrong still. Don't worry too much if you don't get the hang of it, foreigners who have lived here for decades still get it wrong all the time, and people will understand :) Dutch is hard enough to learn anyways haha. Veel succes met leren (good luck with studying)!