The Ondemand CPU Frequency Governor automatically adjusts the CPU frequency in order to save power. It does not simply set the frequency to the lowest setting, because even if you are saving energy, the longer the CPU is in use the more power it uses. So this adjusts the frequency to complete processes as quickly as possible, so it can return to a low power state for longer periods of time, reaching longer and lower sleep levels.

Make sure all package managers are closed, open a terminal and enter each of the following in order:
sudo modprobe acpi-cpufreq
sudo modprobe cpufreq_ondemand
sudo aptitude install sysfsutils
sudo -s
echo "devices/system/cpu/cpu0/cpufreq/scaling_governor=ondemand" >> /etc/sysfs.conf

For the first two, it is good if you do not see any response from the terminal. It only responds on errors. After this, close the terminal window and reboot your computer. After the reboot right-click on the panel where you want the CPU monitor, and select “add to panel” then add the CPU Frequency Monitor. . Then in a terminal enter:
sudo dpkg-reconfigure gnome-applets
select “ok” and “yes” and bam! now every time you left-click on the CPU Frequency Monitor you can choose from the available frequencies, or the available automatic options. Remember, Ondemand is the best for battery life.

sources: http://forum.thinkpads.com/viewtopic.php?t=50949&postdays=0&postorder=asc&highlight=ubuntu&start=0
http://ubuntu.wordpress.com/2005/11/04/enabling-cpu-frequency-scaling/