Organic Reactions: Esterification & Transesterification
Esterification is a type of condensation reaction, as water is a byproduct.
Esterification reactions are a fundamental type of organic reaction where an alcohol reacts with a carboxylic acid to form an ester and water. Esters are characterised by their pleasant aromas and are commonly found in natural substances, such as fruits and flowers, as well as in many synthetic compounds used in food flavouring and fragrances.
General reaction of esterification reactions

Example

Transesterification reactions
Transesterification reactions involve the conversion of triglycerides (fats and oils) into biodiesel through reaction with an alcohol, usually methanol or ethanol.
Methanol is most commonly chosen because it's cheaper and more readily available, but ethanol can be used to make biodiesel.

Biodiesel is a mixture of fatty acid alkyl esters. Biodiesel is a renewable, biodegradable fuel that can be used in diesel engines, either pure or blended with petroleum diesel.
Glycerol is a by-product of the reaction, which can be further refined for use in cosmetics, pharmaceuticals, or as a feedstock for the production of propylene glycol and other chemicals.
This reaction typically occurs in a two-phase system, where triglycerides and an alcohol are mixed, with the help of a catalyst. The triglyceride molecules are broken down into glycerol and fatty acid alkyl esters (biodiesel). After reaction completion, the biodiesel is separated from the glycerol by settling or centrifugation.