The alternatives system is used to manage multiple packages, programs, or executables which perform the same or nearly the same function. This is provided in Debian and Debian-derived distributions, and perhaps others as well.
For instance, the a need for a text editor can be provided by nano, pico, ed, emacs, or vim and other similar programs. You can have them all installed at the same time, but have exactly one that is associated with the command editor at any one moment. The alternatives system is responsible for ensuring that there is always an association if any of the candidates is installed, according to a priority system. If the current associated program is removed, another will be associated if there are any candidates left.