Yeast and fermentation
Grape juice is turned into alcohol by the process of fermentation. Grapes on the vine are covered with yeast, mold and bacteria. By putting grape juice into a container at the right temperature, yeast will turn the sugar in the juice into alcohol and carbon dioxide. The grape juice will have fermented.
The winemaker has many different yeast strains to choose from (and can use different strains at different times during the process). The most common wine yeast is Saccharomyces.
As yeast works, it causes grape juice ('must') to get hot. However, if there's too much heat, the yeast won't work. One modern way to deal with this is to put the juice into large stainless steel containers that have refrigeration systems built around the sides so that the winemaker can regulate temperature precisely.
A less modern, but still widely used way to ferment wine is to place it in small oak barrels. 'Barrel fermentation' is usually done at a lower temperature in temperature controlled rooms and takes longer, perhaps around 6 weeks. The longer fermentation and use of wood usually more expensive than deploying stainless steel containers.
Eventually, the yeast no longer converts sugar into alcohol, and fermentation stops. Note that different strains of yeast, which can survive in higher and higher levels of alcohol, can take over and contribute their own flavor to the wine -- as well as converting a bit more sugar to alcohol.
After fermentation is complete what you have left is the wine, 'dead' yeast cells, known as lees, and various other substances.
The winemaker may choose to allow the wine to undergo a second fermentation which occurs due to malic acid in the grape juice. When malic acid is allowed to break down into carbon dioxide and lactic acid (due to bacteria in the wine), it is known as 'malolactic fermentation,' which can impart additional flavors to the wine. For example, a "buttery" flavor in some whites is due to this process. In addition, since malic acid is perceived as more sour than lactic acid, the process also reduces the perceived acidity of the wine.
Malolactic fermentation is much more prevalent in red wines than in whites, with the smell of apples in white wine denoting the presaging the presence of malic acid.