In your second sentence - what is an apple? - you missed the verb "essere": "cos'è una mela?".
CHE, COSA e CHE COSA are interrogative PRONOUNS, and are used WHEN THE "THING" YOU ARE ASKING ABOUT IS "INDEFINITE" FOR YOU, because you don't know anything about it yet. In this case, in English you would use "WHAT":
WHAT have you seen? - CHE/CHE COSA/COSA hai visto? ("COSA" is a little more informal).
Instead, when we have to use a PRONOUN which refers to something in particular, SOMETHING "DEFINITE", I mean something which has been already mentioned, or that we are mentioning in the question, WE USE THE PRONOUN "QUALE". In this case, in English you would use WHICH or WHAT:
Look at these jackets, WHICH do you prefer? - Guarda queste giacche, QUALE preferisci?
WHAT's your favourite dish? - QUAL è il tuo piatto preferito?
When instead we have to use an ADJECTIVE (in English you would say a "DETERMINER"), I mean when the "QUESTION WORD" (the word you use to "ask") COMES WITH A NOUN, WE USE "QUALE" or "CHE" with the noun (NOT "che cosa" or "cosa" in this case, only "CHE"). In this case, in English you would use, again, WHICH or WHAT:
WHICH SHIRT do you think fits me best, the yellow one or the red one? - QUALE CAMICIA pensi che mi stia meglio, la gialla o la rossa?
WHAT COLOR are your eyes? - di CHE COLORE sono i tuoi occhi? (NOT: di che cosa/cosa colore sono i tuoi occhi).
The pronouns CHE/CHE COSA/COSA are only referred to things, for people we use the pronoun "CHI" (in English "WHO" or "WHOM").
The pronoun QUALE and the adjectives CHE and QUALE can be referred both to things and to people.