When your system is sick your first priority is to secure your data, if you do not have a reasonably current backup.
Emergency recovery of your data on your internal drive/SSD:
First, disconnect all unneeded peripheral equipment, including external drives and keep the power connected.
(Use an external wired keyboard and mouse if necessary.)
Perform an SMC reset: http://support.apple.com/kb/HT3964
Perform a PRAM reset: http://support.apple.com/kb/PH4405
A) Can you boot in normal mode or Safe Boot mode?
Safe Boot: Press the power button and as you hear the bong,
then hold down the Shift key.
If it boots either way, run a Time Machine backup.
(You cannot backup got a wireless Time Capsule in Safe Boot mode.)
If you do not have an existing Time Machine backup drive
then see steps B and C and then try starting a new Time Machine backup.
Time Machine Basics: http://support.apple.com/kb/ht1427
If a Time Machine backup will not complete, proceed.
B) For the next steps you will need a blank disk or a disk
that you are willing to erase (and lose the data on it).
If you have an existing Time Machine backup disk do not use it for the following steps.
Once your internal disk is healthy you may want to restore from it.
If you do not have an empty external drive it is time to purchase one
larger than your internal drive/SSD.
At this point your goal is to recover as much data as you can onto an external disk.
C) To format (and erase) the destination recovery disk:
Boot in Recovery Mode:
• Press the power button and as you hear the bong and
hold down the Command and R keys.
Plug in the drive you are about to erase.
Select the volume that is NOT your system disk.
Click on Partition.
Pull down under Partition Layout to 1 Partition.
Click on Options…
Select GUID Partition Table.
Name: Emergency Backup
Format: Select Mac OS Extended (journaled)
Click Apply.
Click Partition.
D) If it will boot but you cannot complete a Time Machine backup:
Try to boot in normal mode (just press the power key).
If that won't work try to boot in Safe Mode.
• Press the power button and as you hear the bong, then hold down the Shift key.
If it does not work either way jump to E.
Go > Computer.
Double click on the system disk and then on the Users folder.
Drag your named user folder to to the recovery disk.
If that does not work double click on the named user folder
and try dragging each folder individually to the recovery disk.
Repeat for other users if there are any
(logging into their accounts or an admin account).
If this works you have recovered your personal data.
E) If it won’t boot:
Plug in the Emergency Backup drive.
Boot in Recovery Mode:
• Press the power button and as you hear the bong and
hold down the Command and R keys.
Choose Disk Utility.
Click on the Restore tab.
Drag and drop the named system disk to Source (often called Macintosh HD):
Drag an drop Emergency Backup to Destination:
(Do not reverse these.)
Click Restore (the lower Restore button).
F) Seek expert help to test/replace the internal disk/SSD.
G) If it is a spinning disk that needed to be replaced,
save it to attempt a last-ditch effort to use Disk Warrior.
If it is a failed SSD then trash it.
If the disk will still spin, you may be able to recover data from it
buy placing it in an external enclosure and mounting it from a healthy machine
and then using the Finder and/or DiskWarrior.
http://www.alsoft.com/diskwarrior/
H) Once your system is healthy again be sure to maintain two reasonably current backups.
More about backups:
Time Machine Basics: http://support.apple.com/kb/ht1427
Most commonly used backup methods: https://discussions.apple.com/docs/DOC-3045
Methodology to protect your data. Backups vs. Archives. Long-term data protection: https://discussions.apple.com/docs/DOC-6031