For the classical ABBA technique, one multiplies each image by -1 and adds it back to itself after a suitable shift. This method of combining data is often called double sky subtraction as it effectively removes any residual sky that remains after the first subtraction. It results in an image that has one positive spectrum and two negative spectra either side of the positive spectrum.
In the more complex cases, one combines the individual spectra after suitable shifts have been applied.