Macintosh computers are known for their powerful hardware, and good looks, but unfortunately they have had issues with overheating dating all the way back to the original Mac. The cause of this is simple: the more power you run through electronics, the more heat you generate. It is similar to the fact that higher wattage incandescent light bulbs produce more heat. For macs, this is a big issue. Apple uses enclosures that are notorious for being thin and light, which is great for convenience and portability, but not-so-great for heat dispersion.
Computers include systems specifically designed to remove heat, but since they involve moving air through, they eventually suck in dust and other particles. When this happens and the system cannot run at full efficiency, strange things start to happen. Sometimes you will get a temperature warning, but more often the computer will just freeze up and stop working. If your computer has variable speed fans, it will also start to get very loud.
Of course, this doesn’t just apply to Mac computers, but to any PC desktop or laptop as well. It even applies to modern gaming consoles.
If this happens to you, there’s not a whole lot for you to do. What’s important is that you shut down the computer and let it cool. Don’t use it again until you have a professional correct the problem. This will prevent you from permanently frying any components.