Yeah, I also believe that's a symptom of some virus infections.
Although I have no experience dealing with that symptom, it would seem the key will be to regain control of the system. These are only some possible suggestions, and they are guesses.
Disconnect your internet connection so your computer cannot communicate with the web. You don't know what data it might be sending.
While the computer is booting, try to interrupt the boot sequence by pressing F2 or F8 (F10?) to get advanced boot options.
If you boot into Safe Mode, and you still can't prevent it from shutting down, you may need to boot from your Windows XP system CD/DVD. If possible, boot from a CD/DVD-ROM drive that is physically incapable of writing to the disc (i.e. NOT a R/W drive).
If you can get it running, do an immediate virus scan.
If none of this makes any sense, use another computer (or one at your local public library) to research the symptom online and its possible remedies.
The worst eventuality is that you may have to reinstall Windows. There are probably many things you can do first to try to avoid having to do that.