How do I shut down my computer via the command prompt?

In Windows XP you can shutdown on restart your computer using the command prompt. To bring up the command prompt:
Start -> Run -> Type cmd and press Enter.
After that type:
SHUTDOWN -r
to restart
OR
SHUTDOWN -s
to shut down your computer, and press Enter. You can also add time delay to these commands. For example:
SHUTDOWN -r -t 33
will restart your computer in 33 seconds.