You can usually prevent such occurrences by maintaining free space of 10% of the startup volume's capacity or 20 GBs, whichever is greater.
Freeing Up Space on The Hard Drive
1. See Lion/Mountain Lion/Mavericks' Storage Display.
2. You can remove data from your Home folder except for the /Home/Library/ folder.
3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
4. Also see Freeing space on your Mac OS X startup disk.
5. See Where did my Disk Space go?.
6. See The Storage Display.
You must Empty the Trash in order to recover the space they occupied on the hard drive.
You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.
If you no longer can startup the computer to access it, then you have no other recourse but to reformat the drive and start from scratch.
Install or Reinstall OS X from Scratch
Be sure you backup your files because the following procedure will remove everything from the hard drive.
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears.
Erase the hard drive:
1. Select Disk Utility from the main menu and click on the Continue button.
2. After DU loads select your startup volume (usually Macintosh HD) from the
left side list. Click on the Erase tab in the DU main window.
3. Set the format type to Mac OS Extended (Journaled.) Optionally, click on
the Security button and set the Zero Data option to one-pass. Click on
the Erase button and wait until the process has completed.
4. Quit DU and return to the main menu.
Reinstall OS X: Select Reinstall OS X and click on the Install button.
Note: You will need an active Internet connection. I suggest using Ethernet if possible
because it is three times faster than wireless.
This should install the version of OS X that you had installed.