Welcome to the Apple Support Communities
First, open > Software Update to install Mac OS X 10.6.8.
Then, open App Store and purchase OS X Mountain Lion. If your Mac isn't compatible, the App Store won't allow you to purchase Mountain Lion.
While Mountain Lion is downloading, make a backup of your data with Time Machine and/or Carbon Copy Cloner, and check that your apps are supported > http://www.roaringapps.com
When the download has finished, open Finder, select Applications in the sidebar and copy the Mountain Lion installer to an external disk, so you won't have to download Mountain Lion each time you want to reinstall OS X. After that, just open the Mountain Lion installer and follow its steps to upgrade to Mountain Lion