Mechanism of acetal formation:
The mechanism is relatively complex and we shall look at it in detail via considering the reaction of methanol with acetaldehyde. The electrophilic center is the carbonyl carbon and the aldehyde is the electrophile. Methanol is the nucleophile and the nucleophilic center is oxygen. Though, methanol is a comparatively weak nucleophile. The result of it is that the carbonyl group has to be activated through adding an acid catalyst if a reaction is to happen. The 1st step of the mechanism includes the oxygen of the carbonyl group by using a lone pair of electrons to make a bond to a proton. This causes in a charged intermediate in which the positive charge is shared among the carbon and oxygen of the carbonyl group.
Figure: Mechanism of acetal formation - step 1.
Protonation raises the electrophilicity of the carbonyl group, creating the carbonyl carbon even more electrophilic. The result of it is that it reacts better with the weakly nucleophilic alcohol. Now the alcoholic oxygen uses one of its lone pairs of electrons to make a bond to the carbonyl carbon and the carbonyl π bond breaks at similar time with the π electrons moving onto the carbonyl oxygen and neutralizing the positive charge. Though, the alcoholic oxygen now has a not favorable positive charge (that explains why methanol is a weak nucleophile in the first place). This charge is simply lost if the attached proton is lost.
Figure: Mechanism of acetal formation - steps 2 and 3.
Both of the electrons in the O-H σ bond are captured through the oxygen to restore its second lone pair of electrons and neutralize the positive charge.