HEADTAIL is a simulation program developed at CERN which is aimed at studying the single-bunch instability arising from the interaction on successive turns of a single bunch with the cloud generated by the previous bunches. The code includes chromaticity, space charge tune spread, broad-band impedance, and detuning with amplitude for more realistic simulation. Examples of application are shown. Transverse and longitudinal wake functions are also outputs of the HEADTAIL code.