SetCPU modulates the processor frequencies and the way the operating system scales them. Basically, it's an overclocking tool. With it you can make sure your phone uses a specific amount of CPU (minimum-maximum), hence making your battery last longer (given you choose to underclock it, not force it to the limits).
You can find it in the Android Market, but it's not free; you gotta pay for it, but trust me, it really is worth those two bucks.
You can also download it, for free, from XDA-Developers, but only if you are a member, of course. Link to the thread where you can download it, right here.
In order to use this application, you'll need root access -- which I hope you already have by now.
Alright, once you install and run the application, you'll see there are five tabs on at the top : Main, Profiles, Advanced, Info and About. In the About section you will find information about the app, which is nothing of importance to us right now. One thing to note here about this tab is that from there you can choose a different theme for the app).
The Main view
The main view will look like shown in the image above. Here, you can adjust the maximum frequency for the processor and the minimum. The minimum frequency will be the lowest value the CPU can reach when the screen is off (and no application is eating resources in the background). The maximum frequency is... well, the maximum.
The Scaling setting will show the available CPU governors - each one modulates the processor within the given frequency range (min-max). I like to keep ondemand generally, as I (1) don't really have time and will to properly test all the others and (2) I wouldn't really need to.
The image above shows the available governors for me. I use ondemand most of the time, put it on powersave when I really want to save power and on performance when I am running an inteisve task (play a rich-graphics game, for example).
The governors (and also the frequency ranges) vary (1) by phone model and (2) by kernel. I'm using a HTC Desire, and, at this moment, am using the CyanogenMod kernel, which I believe is the best. There are other kernels I could flash, but I figured I'd stick to this one. There is this kernel, Tiamat, that has a bit more CPU governors and pushes the CPU to 1267 MHz max, but the phone freezes at that frequency, so there wasn't really useful.
I have not set up any profiles for SetCPU, but you can do it, and I'll show you how.
Go to the Profiles tab and tap on "Add Profile". Now select the phone state : charging, charging AC (wall charger), charging USB (laptop, solar battery etc.), screen off, Battery < (when it's running low), Temp > (when the CPU gets too hot), Time (you can preset intervals of the day), or In Call (while a call is in progress). Next, choose the frequency range you would like the processor to modulate within (minimum and maximum) and the scaling (governor). I suggest leaving Priority as it is, since I couldn't figure out what it actually does. Now tap "Save" and you're done!
If you want the profiles to be enabled, tap on "Enable". If you want to see notifications in the pulldown menu, tap on "Notifications".
You might notice I skipped giving additional info on the Advanced tab. I didn't forget about it, I simply skipped it because it's not for you to play with (if you don't believe me, go there and see if you can make any sense of it, without giving your phone a hard time living).
Now, on the Info tab you can see additional informations about your Device (shows what model it is, what ROM you are using, what kernel you have), CPU (show the current frequency, the architecture), Battery (temperature & percentage level), Memory and Time in State. You also have a few benchmarks built-in : Short Bench, Long Bench, Native Bench and Stress Test, so you can compare scores when testing different ROMs and/or kernels.
In Time in State you can see how much the processor has been used and for how long. You are also given a graphic, which is quite neat.
I suggest you never set the processor to a HIGHER VALUE. Although my processor is, by default, clocked at 998 MHz, I can up it to 1113 MHz without causing any overheating and/or lag/stutter. If I try a higher value (12xx MHz for example), it freezes and I have to manually reboot it. Never increase the maximum value by more than one step at a time (that should be ~50 MHz, preset). Also, never let it run at a higher-than-normal frequency for long period of times!
Also, keep in mind that while a lower-than-normal minimum value for the CPU would consume less battery, it can make your phone either terribly hard to wake (turn on the screen) either freeze it, again (I like to call this "real sleep").