If the "new" computer has/had Windows XP, the first thing that I would do would be to crack the case open and clean it out (fans/heatsinks specifically), potentially that PC is almost 14 years old, and that's a lot of potential dust buildup, not accounting for if they smoked in the house (that turns dust into fan clogging sludge).
After you ensure that your new PC is clean and in operational standards, you should be perfectly able to install Windows 8(.1) on it.
Most likely, the issue you are having currently is software only, and not hardware, so a clean install of your Windows operating system should cure any issues that you are experiencing.
Best of luck, and report back if you have issues during the cleaning/reinstall process.