The pc keeps shut down due to thermal heat
I'm heaving a problem that my pc keeps shutting down due to thermal heat or high temapture. I had clean the cpu fan and the heatsing my i know why?
The others are correct that if you moved the heat sink, then you need to clean off the old thermal compound and put new thermal grease on the CPU & re-attach the heat sink.
However, you said "the cpu is running at 100% without doing anything" which would imply something entirely different. To know the CPU is running at 100% you used some CPU utility like PC Probe, or something as simple as Task Manager (or one of the better variants, such as Resource Monitor, Process Explorer, or even the much better System Explorer). With the last one, you could zoom in on what process is using too much CPU and pause it or cut it's priority, then follow the modules it uses, turn off the Auto Runs, go into the registry to remove/change the entry [BE VERY CAREFUL IN THE REGISTRY!!!!!], or if it's malware, actually uninstall it. With the other variants you could do some of the first steps.
So I'm suggesting that you put your computer in Safe Mode and use whichever of those utilities you have or can get, and look to see what is using your CPU most and try pausing it. Or maybe you had set a process to Realtime - which should only last until you turn the computer off - the next time it won't auto-run at 100%. That sounds unlikely in this scenario since you say it keeps shutting off, which should've taken care of that. [I said to do this in Safe Mode - if it's a corrupted driver, or certain malware, you may not find a process running away. So restart & hope it's not REALLY 100% so you can - slowly - stop it with your utility.]
Just remember that pausing or worse yet, killing the wrong process [it's called End task in Task Manager] could cause your computer to become unresponsive. So give it a minute or so, then shut it down, give it a minute or two (if it's a laptop, after removing the battery), and restart. If you go into the registry, remember that making the wrong mistake COULD mean having to re-install Windows, maybe after formatting the drive (which would mean losing any data). So if you try that, I hope you have a true backup. If you were lucky, you might be able to use Safe Mode or Recovery Mode to get to a System Restore from a few days earlier.
Because you are in the Dell Dimension E520, I'm guessing that's what you are using. Because you said you cleaned out the CPU fan and heatsink, but didn't mention the PSU fan - even when asked about it, I wonder if you're talking about the E520 laptop (aka Inspiron 6400). But that's a lot of work to get to, so I would guess you are talking about the tower or other version of E520. If the laptop, cleaning out the old heat sink grease & replacing with new won't be easy, if that's what needs to be done. Even if the real problem is what I spent so much time on, if you detached - partially or completely - the heat sink from the CPU, that job ALSO needs to be done - BEFORE you work on the other.
If your PC shuts down "due to heat", I suppose it means it starts when cold and shuts down a short time after.
You say you cleaned the heatsink of the processor. Maybe you moved slightly the heatsink and the thermal contact between processor and heatsink is not good enough any more. Recent processors are protected against overheating, and shut down when they "feel" hot.
Maybe you just have to put new thermal paste or thermal sheet between processor and heatsink. The thermal link generally works well only at first application.