It could possibly be hardware, most likely it is software. You need more information.
If this computer is a business class HP/Compaq, hit F10 when you see the splash screen, this takes you to the BIOS. In the BIOS is the IDE DPS self test, run this test, it will tell you if the hdd is bad.
If it is a Dell hit the F12 key at the splash screen, choose to boot to the diagnostic partition. If there is not a diagnostic partition listed as an option try to get the Dell Recovery CD and boot to it, it will load the diagnostics. You can also download the diagnostics from their support site,http://support.dell.com/.
Based on my experience, it is most likely a virus/spyware issue. Google "SpyBot" to get rid of spyware.