(Unfortunately, you didn't tell us whether this is a laptop or desktop), Please remove the cover from the computer and use compressed air can to blow out all the dust from inside the computer.. Pay attention to cleaning off the processor, the heatsink, the power supply and all fans.. Heat buildup can frequently cause the problem you're seeing.
And when you're done with that, please download, install, update, then restart the computer into Safe Mode. Run a full system scan while in Safe Mode using the tool below and delete all things it finds.
Malwarebytes Antimalware
If you need to download the program on a friend or family member's computer, use the links below to download, then copy them to a CD or flash drive and transfer them to the problem machine and install.
Malwarebytes Download Link (Clicking on the links below will immediately start the download dialogue window.)
http://www.besttechie.net/tools/mbam-setup.exe
Malwarebytes Manual Updater link (To be used to manually update the definitions files AFTER installing the program from the setup file above.)
http://www.malwarebytes.org/mbam/database/mbam-rules.exe
Hope this helps.
Grif
Hello,
Recently I have been having a problem with my computer. Whenever the computer is booting up, it automatically restarts at the loading screen for Windows XP. It happens continuously in a loop and the only way to get past this is by selecting Safe Mode.
I have tried Spybot and avast! antivirus, but I still have the same problem. I am unable to install AVG antivirus in safe mode.
Thanks.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic