Welcome to the Apple Support Communities
Make a backup of your data on Windows because the hard drive will be erased.
1. Press Command and R keys when your Mac starts and open Disk Utility.
2. Select the hard disk in the sidebar, go to Erase tab, choose in Format Mac OS Extended (Journaled) and erase the disk.
3. Install OS X