If your fan has stopped working or your laptop overheats to the point of shutting down often, it needs to be repaired. The solutions above are temporary fixes, and a more permanent solution is often required to resolve the problem entirely.
When buying a laptop, avoid overheating concerns by checking into the model before you buy it. Certain brands and models are well known for having overheating issues, such as Dell Inspirons and some Compaq models. Check to see where the fan expels air from the casing. Will it be blocked by resting the laptop on your lap, or hindered by putting the computer flat on a desk? These are obvious warning signs that the model is badly designed and could eventually be susceptible to overheating issues. Choose your model carefully, and you won't need the solutions explained above.
Another quick fix is to minimize the amount of processing your CPU is doing at one time. Regularly run anti-spyware and anti-virus software to make sure your computer is free from performance-compromising illegal spyware. These programs can eat up your CPU power and cause your system to overheat frequently.