Choose About this Mac from the Apple menu and check the processor.
If it's a Core Duo Mac, click here, install the DVD, and run Software Update.
If it's a Core 2 Duo or better Mac, follow the Core Duo instructions, open the Mac App Store, and try purchasing Mountain Lion. If you get told it's incompatible, phone the online Apple Store and order a download code for Lion.
First you will need to purchase and install Snow Leopard, Mac OS X 10.6...go to the Apple on-line store to purchase the DVD for $20. Then install and update to 10.6.8 via the on-line software update.
Next, you need to determine if your computer meets the Lion, 10.7.5, requirements of at least a Core 2 Duo, i3, i5, i7, or Xeon processor and at least 2 GB ram and 7 GB free space on the hard drive. If it does, call the Apple phone order line at 1-800-MY-APPLE and purchase the code, $20, to download Lion from the Mac App Store. Install.
Next, if your computer meets the specs for Mountain Lion, 10.8.2, found at http://www.apple.com/osx/specs you can purchase ML from the Mac App Store, $20.
If your computer meets the ML specs you can skip the second step of Lion.