In Ubuntu 12.04 you already have python 2.7 installed so, unless you need 2.5.4, there is no need to install it.
To install IDLE:
sudo apt-get install idle
Or you can install it from the software center searching for IDLE in the search box.
Before, you could install idle for python2.5 with:
sudo apt-get install idle-python2.5 but version 2.5 is not anymore included in Ubuntu 12.04 repo so if you can't work with version 2.7, you may have to download v2.5 manually (and dependencies) and install it manually with
sudo dpkg -i path/to/package if you get a deb file or compile it.