The Fischer esterification is one of the most important reactions of carboxylic acids. Treatment of carboxylic acids with an alcohol in the presence of acid catalyst leads to the formation of esters, along with the elimination of a molecule of water. It therefore falls into the category of ”condensation reactions”.
The reaction is an equilibrium. Driving the reaction forward is usually accomplished by using the alcohol as solvent. In practice, a method of sequestering the water is through the use of a Dean Stark trap.
Although the alcohol is generally the solvent in the reaction, it’s possible to perform “intramolecular” reactions where the carboxylic acid and alcohol are present on the same molecule.
Acid helps in two ways: 1) to make the carbonyl carbon more electrophilic, and 2) protonation of OH gives OH2, which is a superior leaving group (i.e. weaker base) in the elimination step.
The reaction goes through the five-step PAPED mechanism described here.