The refers to a specific, particular, unique noun (person, place, event or thing).
(Given a choice of a banana or an apple, I want to eat the apple.)
That distinguishes which among the similar items you wish to indicate
(Out of the whole bowl of apples, I want to eat that apple.)
That also refers to something in distance, even if only a slight distance, compared to one closer to the speaker.
(I'll eat that apple over there, instead of this apple beside me.)
But, as you have probably noticed, you can use the in the sentence above as well, if you retain the distance implication:
(I'll eat the apple over there...)
Just as I could have written, "you can use the in that sentence above as well."
Student or Learner