While you have the About This Mac window open, check what version of OS X your Mac is running.

If you are running Lion (10.7.x), you’re ready to update to Mountain Lion. Go to Step 3. If you are running Snow Leopard (10.6.x), update to the latest version of OS X Snow Leopard before you purchase OS X Mountain Lion from the Mac App Store. Click the Apple icon and choose Software Update to install Snow Leopard v10.6.8, the latest version.