Open your Terminal and enter the following command followed by hitting the Return key.
yes > /dev/null
This will load your processor and run it at 100%. If you have two processors/cores, open another Terminal window and repeat. This will get both processors/cores running at 100%. Tip: You can monitor your processor(s) in your Activity Monitor.
This test can be useful if you're having a thermal issue that's shutting your computer down. It's also good for monitoring your processor(s) temp(s) under heavy load to see how hot they are running and how the efficient the cooling fan(s) are working.
To stop the test, simply close the Terminal window(s) and the process will terminate sending your processor(s) back to 0.
Here are some CPU temperature monitoring apps.