I do this by using batch scripts when swapping between OS's or simply rebooting into Safe Mode or the Recovery Console or the same OS with different options:
1. Rewrite boot.ini to load a different OS by default (or the same OS with different options)
2. Use the Shutdown command with the -R option
3. Again rewrite boot.ini to return to the original OS/settings
Care is required.
Edit: I just realised that you might mean how can you restart Win XP from the command line, use the shutdown -r command at the Command Prompt.