http://www.chemguide.co.uk/organicprops/alcohols/ethetheqn3.gif
Esters are derived from carboxylic acids. A carboxylic acid contains the -COOH group, and in an ester the hydrogen in this group is replaced by a hydrocarbon group of some kind. We shall just be looking at cases where it is replaced by an alkyl group, but it could equally well be an aryl group (one based on a benzene ring).
The acid is named by counting up the total number of carbon atoms in the chain - including the one in the -COOH group. So, for example, CH3CH2COOH is propanoic acid, and CH3CH2COO is the propanoate group.
Doing the reactions
On a test tube scale
Carboxylic acids and alcohols are often warmed together in the presence of a few drops of concentrated sulphuric acid in order to observe the smell of the esters formed.
You would normally use small quantities of everything heated in a test tube stood in a hot water bath for a couple of minutes.
Because the reactions are slow and reversible, you don't get a lot of ester produced in this time. The smell is often masked or distorted by the smell of the carboxylic acid. A simple way of detecting the smell of the ester is to pour the mixture into some water in a small beaker.
Apart from the very small ones, esters are fairly insoluble in water and tend to form a thin layer on the surface. Excess acid and alcohol both dissolve and are tucked safely away under the ester layer.
Small esters like ethyl ethanoate smell like typical organic solvents (ethyl ethanoate is a common solvent in, for example, glues).
As the esters get bigger, the smells tend towards artificial fruit flavouring - "pear drops", for example.
On a larger scale
If you want to make a reasonably large sample of an ester, the method used depends to some extent on the size of the ester. Small esters are formed faster than bigger ones.
To make a small ester like ethyl ethanoate, you can gently heat a mixture of ethanoic acid and ethanol in the presence of concentrated sulphuric acid, and distil off the ester as soon as it is formed.
This prevents the reverse reaction happening. It works well because the ester has the lowest boiling point of anything present. The ester is the only thing in the mixture which doesn't form hydrogen bonds, and so it has the weakest intermolecular forces.
Larger esters tend to form more slowly. In these cases, it may be necessary to heat the reaction mixture under reflux for some time to produce an equilibrium mixture. The ester can be separated from the carboxylic acid, alcohol, water and sulphuric acid in the mixture by fractional distillation.