The X Display Manager is a simple program for providing a login screen for X, rather than starting X with startx after logging in to the command line. There are a myriad of preferable similar programs such as kdm, from the KDE people, gdm from the Gnome people, and others such as wdm. Xdm does not (directly) provide the ability to do things like shut down, reboot, or choose a window manager before logging in; thus, if you use xdm and you mess up your window manager configuration, congratulations! You're fucked. (Unless, of course, you know to press F1 instead of enter, which brings you into failsafe mode - and no, there is no Kremlin this time. Thanks, ariels)
The setup files for xdm are under /etc/X11/xdm. You can change various appearance issues in Xresources, and you can specify a program to start, such as a console, clock, or toy, in Xsetup. When a user logs in, the Xstartup script is run as root, and then the Xsession script is run as the user, usually starting a window manager and sometimes a useful program or two. This provides the backbone for a customizable user setup of a Unix system.
If you don't know what in the world this is about, you should look at Unix, Linux, and X Window System.