This could be the result of a hard drive error. There are three different things that might be causing this issue, bad sectors, failing hard drive, or physical damage to the hard drive. Bad sectors, which may just be a software issue, can be resolved by using the Windows’ Disk Check tool. There may be physical damage to the hard drive and it will need to be replaced if the Windows' Disk Check does not work. You might want to run a diagnostics test to see if the hard drive is failing. This will tell you whether the computer is okay to use or not. Stopping and starting whirring sound and clicking noises are good indicators of a failing hard drive, in which case you need to replace the hard drive.You should also try running CHKDSK and reinstalling the operating system. If nothing else works you need to replace your hard drive.
The fan might have dust building up causing the fan to stop and start repetitively. The fan could also be overheating. If this is happening it needs to be cleaned out.