The "reboot" command invokes the "shutdown" command with the "-r" option, which in turn switches the system to runlevel 6. If you specify no delay ("-t" option) and add "now" instead, the switch will be performed immediately. Switching to runlevel 6 means that a script (or a set of scripts) will be executed in order to bring down the system properly, by stopping daemons, unmounting filesystems and so on.
Look at your "/etc/inittab" in order to see which script is used for a given runlevel. For instance, on Slackware Linux one will see the following line, which points to tho proper script for runlevel 6:
Code:
# Runlevel 6 reboots the system.
l6:6:wait:/etc/rc.d/rc.6
On other distros based on SysVinit the init directory will be "/etc/init.d/". Because scripts are plain text files, it's fairly easy to see what's happening when switching to a given runlevel. You will find everything in the man pages:
Code:
man reboot
man shutdown
man inittab