Press and hold down the Power button until the computer shuts down. Wait about one minute. Then do the following;
Try these in order testing your system after each to see if it's back to normal:
1. a. Resetting your Mac's PRAM and NVRAM
b. Intel-based Macs: Resetting the System Management Controller (SMC)
2. Restart the computer in Safe Mode, then restart again, normally. If this doesn't help, then:
Boot to the Recovery HD: Restart the computer and after the chime press and hold down the
COMMAND and R keys until the Utilities menu screen appears. This will be slower than a normal
startup.
3. Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the Utilities menu. Repair the Hard Drive and Permissions as follows.
When the recovery menu appears select Disk Utility and press the Continue button. After Disk Utility loads select the
indented Macintosh HDentry from the the left side list. Click on the First Aid button in the toolbar. Wait until the operation
completes, then quit Disk Utility and returnto the main menu.
4. Reinstall OS X: Reboot from the Recovery HD. Select Reinstall OS X from the Utilities menu, and click on the Continue button.
Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.