Backup first
It is always best to have a full bootable backup before you upgrade. If you fail to do this you will be unable to return to this OS if you decide you don't like the new OS. Also there is a slight chance that an install could lose everything on the Mac. The backup must be to an external hard disk. Preferably use Carbon Copy Cloner to make a bootable backup of the whole disk.
Erase before the install
Once you have a bootable backup on an external disk it is best to erase the internal disk with the new installer DVD before you install.
During the install
Preferably do not import any data or preferences from earlier OSs during the install process as this can reintroduce bugs.
OS numbers and names
OS X 10.4.x - Tiger
OS X 10.5.x - Leopard
OS X 10.6.x - Snow Leopard
OS X 10.7.x - Lion
OS X 10.8.x - Mountain Lion
More about Macs
The Apple History site has specifications for every Mac ever produced: http://www.apple-history.com/
Upgrade to Leopard
Those wishing to upgrade to Leopard should be aware that install disks can be expensive unless you contact Apple. Details: http://lowendmac.com/deals/best-os-x-leopard-prices.html Standard Leopard installers impose several hardware limitations including speed and RAM size but all these restrictions can be overcome. Google for details. Leopard works well at 500 MHz with 1 GB of RAM and many happy users have less than this.
Upgrade beyond Leopard
OSs beyond OS X 10.5.8 require an Intel processor. If in doubt check this: Click the apple at the top left of your screen and select 'About this Mac'. This will give you your OS number. Then click 'More Info' to see which processor you have. If it says PowerPC you cannot upgrade to Snow Leopard and above. If you have an Intel Mac it is well worth upgrading to Snow Leopard now and then considering other options after that. You can buy Snow Leopard here: http://store.apple.com/us/product/MC573Z/A
Upgrade beyond Snow Leopard
Information about upgrading Snow Leopard to Lion or Mountain Lion: http://store.apple.com/us/product/MD256Z/A
Important
Check that your Mac complies with any requirements. If you are not in the US you should use the Change Country link at the bottom of Apple pages.