If the final wine has a high residual sugar content, the wine could be sweet wine. There are several methods to make sweet wine in different stages during the vinification process.

Before Fermentation
The winemaker can increase the sugar level of the grape before the fermentation begin. The sugar level of the grape is so high that the final wine has high residual sugar content even though the wine has fermented to a high alcohol volume, such as Recioto which has a 14% alcohol volume. There are 4 common methods to concentrate the grape’s sugar level.

Late Harvest
Through delaying the harvest date, the grape can overripen so that the sugar is concentrated.
Good examples are: Vendages Tardives in Alsace and Spätlese in Germany.

Botryised Grapes
Botrytis cinerea can leave a great many small holes on the grape skin. It is sunny and drying in the afternoon so that the water could evaporate through those small holes. Everything in the grape is concentrated, including sugar.
Good examples are: Sauternes AOC in Bordeaux, Sélections de Grains Nobles in Alsace, Beerenausles(BA) and Trockenbeerenauslese(TBA) in Germany.

Ice Wine
The healthy grapes are left on the vine after ripening until the environment temperature is decreased to under frozen degree so that the grapes are frozen. Then the grapes are harvested manually and pressed immediately. The grape juice can have a high sugar content, because the sugar has a lower frozen temperature degree than the water and the water is left in the pressing machine.
Good examples are: Eswein in Germany and Austria and Icewine in Canada.

Drying Grapes.
The grapes are put in the room or under the sun after harvest, to let them to be dried naturally. Water evaporates so that everything in the grapes concentrated. Those dried or semi-dried grapes can be used to make dry to sweet wines.
Good examples are: Recioto di Soave DOCG, Recioto della Valpolicella DOCG and PX Sherry in Spain.

During Fermentation
If all the sugar in the grapes is converted into alcohol by yeast, the wine should be dry. But if the fermentation process is stopped naturally or manually before the fermentation finished, there will have residual sugar left in the wine. The wine could be sweet. There are three common methods to make sweet wines.

Adding Spirits.
The yeast will be killed when the alcohol reaches around 15%. Winemakers can add the distill spirits into the wine during the fermentation process to kill the yeast. So the fermentation stops and the Wien has residual sugar. The earlier adding the spirits, the sweeter the wine could be.
Good examples are: Port in Portugal and VDN in France.

Adding Sulfur Dioxide
It can also kill the yeast. It is the same as adding spirits do.

Chilling and Filtering Yeast
The yeast can not work in the lower temperature, so winemaker can decrease the temperature to a very low degree. That leads to the yeast dormancy so that the fermentation stops. Then filter the yeast, the unfermented sugars are left in the wine.
Good example is : Moscato d’Asti DOCG in Italy.

After Fermentation
After the fermentation finished and all the sugar are converted into alcohol, the wine should be dry, but winemakers can add sweet component to the dry wine to make sweet wine.
Sweeten by soaking dried grapes or botrytised grapes.
Good examples are: Cream Sherry in Spain and some noble rot wines.
Sweeten by adding unfermented grape juice.
Sweeten by adding sweet wines.