Choose About this Mac from the Apple menu and check the processor.
If it's a PowerPC Mac, it's already running the newest OS it can.
If it's a Core Duo Mac, click here, install the DVD, and run Software Update. If you're actually using Mac OS X Server, phone the online Apple Store instead.
If it's a Core 2 Duo or better Mac, upgrade it as if it was a Core Duo Mac, and if desired, open the Mac App Store, and try downloading 10.9. If you get told it's incompatible, go to the online Apple Store and order a download code for Lion 10.7.
Mac OS X 10.7 and newer don't support PowerPC software such as Microsoft Office 2004. If you upgrade the OS, back up the computer first.