Welcome to the Apple Support Communities
The most recent Mac OS X version for your computer is Mac OS X 10.5. Apple doesn't sell it anymore, so you have to buy Mac OS X Leopard in Amazon. Make a backup before upgrading. After upgrading, open Apple menu > Software Update to install the latest version
Does your Mac meet the Leopard requirements?
Mac OS X 10.5 Leopard installation system requirements
Leopard installers are hard to find. Look on eBay or Google the installer part numbers to possibly find at an on-line store. Here's what to look for:
MB427Z/A Leopard 10.5.1 install DVD
MB576Z/A Leopard 10.5.4 install DVD
MB021Z/A Leopard 10.5.6 install DVD (single user)
MB022Z/A Leopard 10.5.6 install DVD (5-user family pack)
Installing Mac OS X 10.5 Leopard
Mac OS X 10.5 Leopard Installation and Setup Guide
After you install the base 10.5, download & install the 10.5.8 combo update at http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update
The DVD should look like this
Caution - Leopard does not support classic mode. So, if you currently open OS 9 apps in classic mode, you won't be able to do this if you upgrade to Leopard.