One way to keep your CPU cool is to upgrade your fan. Often computers include low-quality fans that keep the CPU cool enough to work, but the fan will not keep the CPU cool enough to run well. If you upgrade your fan, you can keep your CPU cooler.
You can also add a water cooling kit to help keep your CPU cool. The kit works by pumping cold water in tubes over the CPU and then pumping the warm water away to be chilled.