The chemical reaction of producing biodiesel is a biodiesel esterification. Animal and plant fats and oils are typically made of triglycerides which are esters of free fatty acids with the trihydric alcohol, glycerol. In the transesterification process, the alcohol is deprotonated with a base to make it a stronger nucleophile. Commonly, ethanol or methanol are used.
Normally, this reaction will proceed either exceedingly slowly or not at all. Heat, as well as an acid or base are used to help the reaction proceed more quickly. It is important to note that the acid or base are not consumed by the transesterification reaction, thus they are not reactants but catalysts.
Almost all biodiesel is produced from virgin vegetable oils using the base-catalyzed technique as it is the most economical process for treating virgin vegetable oils, requiring only low temperatures and pressures and producing over 98% conversion yield (provided the starting oil is low in moisture and free fatty acids). However, biodiesel produced from other sources or by other methods may require acid catalysis which is much slower. (source wikipedia)