After purchasing a new hard drive or managing a corrupt one on an older Mac, you can install your current version of OS X even though you might not have a working Recovery option (on the drive or through Internet Recovery) present on your system.
New Mac systems built in 2010 and later support an Internet Recovery mode, which can be used to download the boot image generally stored on the OS X Recovery partition so you can run diagnostics. This mode is convenient to have, since errors with the hard drive or a blank hard drive could prevent the conventional recovery partition from working. If your system was built before 2010, then even though it might run the latest OS X versions, it will not have Internet Recovery as an option, which can result in problems if you have swapped out the hard drive, or experience problems with it and wish to reinstall freshly.
In the event of swapping out a healthy drive with a new one, you can put the old drive in an external enclosure, boot off of it, and then use a cloning tool to mirror its contents to the new drive. But when replacing a faulty drive, this might not be doable.
In these cases, then you have two options. The first is to install OS X 10.6 Snow Leopard on your computer, which is on the gray installation discs that came with your system, or on a retail Snow Leopard installation DVD. After installing this version, you will then need to update it, and access the Mac App Store where you can download a previously purchased license for Mountain Lion to install.
This procedure will require you to install and upgrade, but if you wish to install only the latest version of OS X freshly, then you will need to create an external recovery drive to use with your system. If you had the foresight to do so with the latest version of OS X, then you might have such a drive around somewhere; however, if not then you will need to access a system running Mountain Lion and use Apple's Recovery Disk Assistant to mirror the recovery volume to the drive.
With the recovery drive created, attach it to your Mac and reboot with the Option key held down, and you should see it appear as an option in the boot menu. Select it and continue booting, and you should load to the standard OS X Tools window, which you can use to format your internal drive and reinstall OS X.
Keep in mind that if you need to do this procedure, then since your computer did not ship with Mountain Lion, you will need a valid Apple ID that is associated with a Mountain Lion purchase. This will be required to log in to the App Store and download the Mountain Lion installer when booted to the Recovery drive.