The best way is to enter the recovery mode while restarting Mac, and then erase the Hard Disk Drive. Then you must install a new version of OS X on your Mac.
Attention: All your files will be deleted after erasing the HDD.
NOTE: Enter the recovery mode by pressing ⌘-R while restarting Mac.