Most wines are vinified dry (more or less, depending on the country, wine style and fashion), which means that the sugar contained in the grape is completely converted into alcohol during fermentation.
The situation is different with sweet wines, where there are a number of possibilities:
either the fermentation is stopped before the sugar is completely consumed, e.g. by topping up (adding brandy) as with Sherry or extreme cold, which prevents the yeasts from continuing to work.
The finest sweet wines, however, are produced by noble rot (Botrytis cinerea), drying on the vine(Spätlese), drying after the harvest (as with Italian Passito wines) or freezing on the vine(Eiswein).
They are neither drunk every day nor in large quantities - but they make wonderful dessert accompaniments. A glass of these rare nectars is simply divine with a baked apple pie such as tarte tatin!
For recipes and inspiration, I recommend taking a look at: Valentina's cookery book. Since 2008, ambitious amateur cooks have been testing and rating cookery books and publishing the best recipes!