Ediff is a feature of Emacs which allows comparing two or more files or buffers, as well as merging two files or buffers into one.
Ediff user manual: http://www.delorie.com/gnu/docs/emacs/ediff_1.html
Ediff page on Emacs wiki: http://emacswiki.org/emacs/EdiffMode