DESSERT: The noun "dessert" refers to something sweet you eat after a meal. It is from the French noun dessert which comes from the verb desservir, to clear the table, so a dessert is something served after the main meal has been removed.
The phrase "just deserts" is something different from either of the two words above! In this phrase, "deserts" is related to the English verb "deserve," and it is pronounced with the stress on the second syllable, "just deSERTS." So, when someone gets their "just deserts" that means they are getting just what they deserve. You will often see this misspelled because the stress on the second syllable really does make it sound like "dessert" rather than the usual noun "desert."