If your computer is overheating it could have a build up of dust inside it around the heat sink and CPU and a good cleaning of the computer with some compressed air and a vacuum cleaner can sometimes stop a computer from overheating.
If it's still overheating then something else could be wrong or it's being overclocked or your CPU fan or fans are not running properly.