Hi, I'm Ashik. Welcome to JustAnswer. I'm reviewing your question now, and will post back with your reply ASAP
We need to free atleast 2GB so that Mac will boo tup. Lets clear some old temporary system files from your Mac. Turn your Mac off. Turn it back on and immediately hold down the Command (Apple) key and the S keys at the same time. Then type the following command when it boot into black screen with white letters, hitting return after each commands. Make sure you enter them correctly and note the spaces between commands.
mount -uw /
Hit return after entering reboot and then immediately hold down Shift key for 20 seconds. Then login to your account. Let me know if you get any errors when you run the commands.
And let me know how it goes
This usually happens if the system files are corrupted or if there is any issue with the hard drive. It could be the hard drive that is failing. We can run Disk Utility and see if it works or not. Turn off your Mac by holding down Power button for 10 seconds. Then turn it back on and immediately hold down Command and R keys at same time for 20 seconds and this will boot your Mac to the Mac OS X Utilities screen. From there, click Disk Utility. Select your hard disk at left column (Macintosh HD or hard disk name). Then click Verify Disk (under First Aid). If asked to repair, click Repair Disk. Then click Repair Permission.
If you are using latest Mac OS X El Capitan, then you will not see Repair Disk option in Disk Utility. Instead click First Aid button and run it. Repair if asked.
Then restart from Apple menu. If that didn't work, then turn it off. Turn it back on and immediately hold down Command, Option, P and R keys at the same time for 5seconds, then release the keys and immediately hold down Shift key for 20seconds. Does it boot into desktop ?
Please let me know if that didn't work, so we can continue troubleshooting.
What version of Mac OS X are you using ?
Do you have the OS X installation discs ?
We may need to do a erase and install if nothing is working. But we can try to fix it without reinstalling.
Do you have the backup of your files ? Do you have any important files on your Mac ?
Then you can do a erase and install. This will delete everything from the Mac and install a fresh version. This will be the quickest solution.
But we can try to fix it without erase and install. Which one would you like to do ?
If you are running 10.5 or 10.6 version, then we need to the discs to do erase and install.
Insert the Mac OS X Installation disc 1 to your Mac. Then turn it off. Turn it back on and immediately hold down C key for 20 seconds and this will boot into the OS X installation screen.
If that didn't work boot into installation screen, then insert the disc 1, restart and immediately hold down Option key on keyboard. This will boot into startup manager. Select OS X disc and press return. This will boot into the disc.
In the installation screen, Click on Utilities menu and select Disk Utility. In Disk Utility, select Macintosh HD in left column (your hard disk). Click on Erase tab and click Erase button. This will erase it. Then close that screen and follow the onscreen instructions to reinstall OS X.
Let me know how it goes please.