You'll want to have at least one of the two programs open during stress tests. While many components will automatically shut down if they overheat, not all will, and you want to pull the plug on your testing if your hardware hits dangerous heat levels. You can fry your components if a worst-case scenario occurs and you're not paying attention. If you see CPU temperatures starting to creep north of 70 degrees Celsius, or graphics card temperatures around 105°C (though that varies by model--do your homework!), stop the test and add more cooling to your computer. You'll also want to halt your testing if temperatures continuously hover around those marks for an extended period of time.
Before you start your testing, I recommend closing any nonessential programs and diving into your system's Power settings to prevent it from going to sleep. You don't want your computer to doze off while you're busy burning it in. If you use a screensaver, disable that too.
Push your CPU with Prime95
If you stress-test only a single component, stress-test your CPU. It's that important--and it's frequently the culprit behind an unstable system.
While a handful of programs are available that can stress your CPU to its limits, Prime95 has become the de facto standard. Ostensibly designed to find Mersenne prime numbers, the software absolutely hammers your processor, to the point that the developers now include a dedicated "Torture Test" mode for people who are interested in system stability than complex mathematics.
Open the program, then head to Options > Torture Test to bring up a list of options. Many people use the Blend test. Blend stresses both the CPU and RAM; if no errors pop up after four hours or so, you can consider it stable for normal use. Alternatively, the Small FFT and Large FFT torture tests lay off the RAM a bit to subject the CPU to as much respective stress and heat as possible.
If you have the time (and adequate cooling), feel free to "torture" your PC with Prime95 for much, much longer, particularly if you plan to use your computer for folding@home-type projects, which can consume a ton of CPU resources for extended periods. Prime95 sometimes catches CPU errors even after half a day of testing. If your rig can run Prime95's Small FFT test for a full 24 hours without issue, the CPU is as solid as a rock and ready to fold.