Well we will give it a shot.
First off we might need a list of what kind of hardware you have in the PC.
If you know off hand. What CPU, motherboard, Onboard graphics or card, memory amount, hard drive, POWER supply wattage?
Windows version? MAC?
The power supply would be my first guess.
A dirty dusty power supply that is overheating or not enough wattage to run everything on the system will sometimes do this especially if the memory is drawing more power from the video card or main memory to run a heavier application such as a game.
Drivers all up to date? This is a biggie. sometimes something as simple as keeping all the hardware drivers up to date can avoid these issues.
Alot of people do not want to take the time to keep everything running smooth.
If there is no obvious problem ,nothing must be wrong.

Sometimes the memory being seated wrong or a bad stick can cause lockups and random restarts.
I am no tech wizard but these are the first things I look at in older PC's
Get as much info as you can to us and I am sure someone here will be able to pinpoint your problem.
Good luck.