Assuming it is the Maverick OS....
Scroll down on this link and follow the directions there for doing a clean install.
Help to do Clean install OSX Mavericks: Apple Support Communities
Here is a small excerpt from that link above:
.........Warning: Performing a format and clean install of OS X will erase the Macs hard drive and all contents on the drive will be removed. All files, applications, documents, photos, customizations, everything on the computer will be lost in this process. Understand this and know what you are doing, and why, to prevent data loss of critical files. We can not reiterate this enough.
How to Format & Clean Install OS X Mavericks on a Mac
You will need a bootable OS X 10.9 installer drive to accomplish a clean Mavericks install using this method. You can learn how to easily create one here if you haven’t done so yet...........
“Every atom in your body came from a star that exploded and the atoms in your left hand probably came from a different star than your right hand. It really is the most poetic thing I know about physics...you are all stardust.”― Lawrence M. Krauss
A 1792 U.S. penny, designed in part by Thomas Jefferson and George Washington, reads “Liberty Parent of Science & Industry.”