Hi, I'm Ashik. Welcome to JustAnswer. I'm reviewing your question now, and will post back with your reply ASAP
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.