See if this helps. It was posted by another user a while back.
I had the same issue with my 2008 iMac and Apple support walked me through the fix yesterday...
1. Shut the computer down by holding the power button for 10 seconds
2. Restart the computer and press shift at the same time until you see the progress bar start moving
3. Once you reach the point where your screen goes dark and you see the cursor, type the first letter of the username for your computer, then hit Enter, then type your password, then hit Enter.
4. After a moment, you should see the spinning beach ball
5. Your screen should then move on to something along the lines of "Completing OSX Installation" (I can't remember the exact wording). Let it finish. After that it should go to your normal desktop and the issue should be fixed. (If your screen goes pitch black during this process, hit the space bar. I thought it wasn't working, but the screen was just sleeping).
Apparently it's an issue with an automatic update that never quite got past the login screen.
If it isn't helpful, then try the following:
Reinstall El Capitan or Later Without Erasing Drive
Please be sure you back up, if possible.
- Restart the computer. Immediately, at or before the chime, hold down the Command and R keys until the Apple logo and progress bar appear. Wait until the Utility Menu appears.
- Select Disk Utility and click on the Continue button.
- Select the indented (usually, Macintosh HD) volume entry from the side list.
- Click on the First Aid button in Disk Utility's toolbar. Wait until the Done button activates, then click on it.
- Quit Disk Utility and return to the Utility Menu.
- Select Install OS X and click on the Continue button.