If you have another mac you can follow these steps to make a bootable USB with any of the OS installers in the purchased tab in the App Store. ( preferably the same OS you are on or newer)
If you can get to recovery by holding down Command + R or Command + Option + R or use the USB you just created.
I would first go to Disk Utility and find the Main Hard Drive which is named Macintosh HD by default. Then click First Aid, Verify or Repair disk. If the drive is OK then you just need to go back to the main screen and reinstall OS X to fix it without losing data. If you don't care about data you made after your Time Machine Back up then restore from Time Machine.
If the drive fails I recommend getting a cheap SSD and use the USB or Time Machine drive to format it to Mac OS Journaled then restore your Time Machine to it.
***NOTE***Did you know you can boot directly from your Time Machine? If all else fails hold down the option key when you start the Mac while your back up is connected and you should see it. Just click on it and it should boot into the OS stored on Time Machine.(Should)****