You have created a major problem by filling the HD. NEVER EVER FILL UP A HD!!!
If you can still boot to the iMac then what you need to do is create more space on the internal HD. I suspect you have filled the HD with media including photos, music and movies. These all can create large libraries that take up huge amounts of HD space. Get another external HD and move those libraries to the new EHD. Below are some links you can use to learn how to move thses:
https://www.youtube.com/watch?v=_-JVTO74CEo
Copy the iTunes folder to your external drive
- Quit iTunes.
- Locate your external drive. ...
- Locate your iTunes folder:By default, the iTunes folder is located in: ...
- If the iTunes folder is not in the default location listed above, find the iTunes folder by following these steps: ...
- Drag the iTunes folder to your external drive.
Once you have moved the folders to the EHD, then you need to double click each folder in it's new location. This will launch the app (iTunes, iPhoto, etc.) and also teach that app where the library is now located. Once you have done that, move the library from the old location (the internal HD) to the Trash and empty the Trash. This will free up valuable space on your internal HD.
If you cannot boot the computer at all you will need to take the computer to an Apple Authorized Service Provider and they will do this for you. Ask them to connect the computer to another Mac, boot into Target Disk Mode and to please move the large libraries (likely iTunes & iPhoto & iMovie) to an external HD. Then tell them, once the libraries are moved to removed those libraries from the internal HD.
Good luck!