If your MacBook is not responding to commands, or the pointer does not move, you might need to force it to shut down rather than using standard shutdown procedures. Apple provides three ways of dealing with a frozen MacBook and recommends attempting them in a specific order. Any time a computer freezes and must be shut down or restarted, unsaved work might be lost and unrecoverable.
Attempt to force quit applications by pressing the "Command," "Option" and "Esc" keys on the keyboard and selecting the application that will not respond.
Press the power button on the MacBook and hold it down for a few seconds until the MacBook shuts down. The power button is located above the MacBook keyboard on the right side.
If holding the power button alone does not work, press the power button and the "Command" and "Control" keys on the keyboard to force restart the computer.