It depends in part on how you started it. If you are running XDM, GDM, KDM, or some other program that lets you log directly in to X, then you have to stop that program after you have logged out of your X session. The way I usually do this is as follows:
1) Log out of your X session. If you are using Gnome or KDE, then use the foot menu/ KDE (I think it's a gear?) menu to choose the log out option. Any other window manager will probably produce a menu that includes an 'exit <whatever>' option if you click on the screen some place where there isn't anything else showing. (Try all three buttons - which one produces this menu varries.) Failing all of the above, use the key combination ctrl+alt+backspace
2) If logging out puts you back at a command prompt, you weren't running KDM, GDM, or XDM. X is no longer running. Otherwise, you will need to stop your display manager. Start by hitting ctrl+alt+F1, which should give you a text-only login prompt. (on /dev/tty1) Log in as 'root'. On a Debian system running GDM, the command now would be '/etc/init.d/gdm stop'. Substitude kdm or xdm if you are running that instead. I *think* these are right for Red Hat as well, but I don't have an RH machine handy to double check, and this is an area where there is some difference between the two distros.
Of course, if you don't actually need to *stop* X, just want a command line for a while, you can simply hit ctrl+alt+F#, where F# is F1-F6 (Probably. This is configurable, and I've certainly set up systems to use more, but if you don't know how to do all this, you've probably still got the defaults.) You can then switch between six separate command line screens with alt+F#, and go back to X with alt+F7.