The process you follow will require you boot from the Recovery HD:
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the arrow button below the icon.
When the Utilities Menu appears select Disk Utility and click on the Continue button. Follow the instructions in the below link for the OS X version you wish to reinstall.
Install or Reinstall Mavericks or Mountain Lion from Scratch
Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
OS X Mavericks- Erase and reinstall OS X
OS X Mountain Lion- Erase and reinstall OS X
OS X Lion- Erase and reinstall Mac OS X
Note: You will need an active Internet connection. I suggest using Ethernet if possible
because it is three times faster than wireless.