As the Xdm manual page explains:
Xdm manages a collection of X displays, both local and possibly remote - the emergence of X terminals guided the design of several parts of this system, along with the development of the X Consortium standard XDMCP (the X Display Manager Control Protocol). It is designed to provide services similar to that provided by init, getty and login on character terminals: prompting for login/password, authenticating the user and running a ``session.''
A ``session'' is defined as the lifetime of a particular process; in the traditional character-based terminal world, it is the user's login shell process. In the xdm context, it is an arbitrary session manager. This is because in a windowing environment, a user's login shell process would not necessarily have any terminal-like interface with which to connect.
Xdm can make use of the MIT-MAGIC-COOKIE-1 authorization, detailed below.