Hi, everyone. CPU overheating is a problem I have some experience with, so I would like to add my thoughts to the collection.
There are several things I know of that can cause a CPU to run a little too warmly, or get downright hot:
1. Dust or lint blocking the heat sink.
2. Failure of the CPU's cooling fan, or the computer case's cooling fan(s).
3. High ambient temperature (room temperature).
4. Overclocking the CPU.
In my experience, a blocked heat sink is the most common problem. I am a smoker, and smoke forms a sticky film on surfaces that attracts and holds dust. I also have a friend who doesn't allow smoking in his house, but he has a defective clothes-dryer vent that creates airborne lint. My heat sink gets clogged with smoky dust, his with lint, and the result is the same. The air must flow or the cooling won't happen.
Fan failure: This should be self-explanatory.
Room temperature: While the ambient temperature should not cause your CPU to overheat, it is, nevertheless, a factor that most people overlook when trying to calculate their processor's temperature performance. I notice that my CPU's operating temperature rises measurably as room temperature rises. A five-degree change in room temperature results in ... guess what ... a five degree change in CPU temperature. Just something to think about when making really picky temperature measurements.
Overclocking is not something that most people do. Technically experienced people may try to boost CPU performance by increasing the processor's clock speed beyond what the manufacturer recommends. If the CPU can stand it, this may enhance computer performance ... but it will inevitably cause the CPU to run hotter.
What causes CPU heat, anyway? Well, your computer is an electronic device, so it works by electrons traveling through conductors. Whenever electrons travel through conductors, they generate heat. The conductors (wires) warm up due to the passage of electrons through them. In a CPU, there are millions of conductors in a very small space. The amount of heat generated is tremendous, for its small size, so it has to be aggressively cooled, else parts of it would melt.
And that's my humble contribution. I hope something in it helps someone. If nothing else, I had fun writing it!