The simplest and safest way to install software in Ubuntu is to use the apt-get. But for it to work you need to know two things - you need to know what do you want to install, and you need this piece of software to be available in your repositories list.
Unfortunately, not all software that you may need is available in the default repositories. Usually this means that you need to go and look for a repository - most of the time it is enough just to google the program name, but there is a easier way. You can download a custom repositories list, and then to use it instead of your default one.
If this doesn't scare you away - click to download a large Hardy repositories list.
Update: Some of the repositories in the original list are outdated. Click here to download an updated version of the list. It is smaller, but all the repositories in it are working
Update 2: An even newer list, get it here.
To install it run these commands in terminal:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo cp $HOME/sources.list /etc/apt/sources.list
sudo aptitude update
sudo aptitude upgrade
After this, check the errors that the apt-get update commend will return, and add the keys for the repositories. In order to do this you will need to find the key to the repositories (it is listed in the sources file) and then run the following commands (replace KEY with the key listed in the list):
sudo gpg --keyserver subkeys.pgp.net --recv KEY
sudo gpg --export --armor KEY | sudo apt-key add
It will take a lot of time, but after this you will have a lot of extra repositories available. If at some point you will no longer need the extra repositories, or will want to remove them temporaly from the source file you can just run the following command:
sudo cp /etc/apt/sources.list.backup /etc/apt/sources.list
If you know a repository not mentioned in the list you are welcomed to share it in the comments...