Power down, all the way off.
Then boot using this key command:
Command-OPTION-R
If you connect via wifi, you'll need your wifi password.
The internet utilities take a while to load, be patient.
Does this work?
Do you get to the internet utilities?
If so, that's an important first step.
Next, do this:
Open disk utility.
ERASE the internal drive to "Mac OS extended with journaling enabled, GUID partition format".
When done, quit disk utility.
Now open the OS installer.
Accept whatever version of the OS it presents to you.
Start clicking through.
Does the OS install?