Given no one has said this yet..
tar.gz, tar.bz2, and zip are generally source for programs, able to compile and install on any Linux system. (not recommended for new users though)
.rpm is for Red Hat based distributions, or those random distros that use it.
.deb is for Debian based systems, like yours. This includes all the types of Ubuntu.
.tgz is for Slackware, and the few distros that are like it.
Basic installs for all types:
tar -zxf programname.tar.gz
(sudo prompts for your password)
sudo make install
.deb is recognized by the program GDebi installer in Gnome, Kpackage in KDE.
.rpm can be installed in different ways, most common being:
rpm -ivh filename.rpm
yum -localinstall filename.rpm
.tgz, for Slackware only are used via:
Note that only the source and the .deb descriptions apply to Ubuntu. Most *buntu-ers are fine without installing from source, but its not a bad idea.
Hope that helped.