Is it a laptop or desktop? If desktop, when was the last time you cleaned it out? Overheating of the unit, especially the power supply will cause these kinds of re-booting problems. Many computers will shut down or reboot when the temp gets too high to protect the systems from heart damage.
10 year old computers get old and rusty, could be dust issues or hardware or programs that you have added, might not be compatible. The thermal paste would have dried out although the paste is not so necessarily in older Pc'sas it is required for much later Pc's.
Possibly the PSU is at fault or the ram is mixed or wrong values. What hardware have you added, what version XP, service pack?
Give full details of all your hardware make and model of each item.