Usually you change the default runlevel by editing /etc/inittab. However, sometimes you boot into runlevel 3 (e.g. by selecting safe mode from the grub menu) and then want to change to runlevel 5. This you accomplish on the fly with the command:
In RedHat 9, just change in the /etc/inittab file the runlevel from 5 to 3 and you will have only the command line left by default upon booting. No X11 graphical login etc. In newer Ubuntu releases, this apparently doesn't work anymore, although telinit + number should still change the runlevel, but at least in the Precise Pangolin (12.04), telinit 2-5 appears not to do anything. Telinit 1 tries to shutdown the machine, but the shutdown got stuck halfway when I tested it. To achive something similar to changing to runlevel 3, you will have to shutdown the GUI (meaning to kill the gdm or lightdm process). The runlevel concept seems to be dead.