If your Mac is unresponsive, you have to do a hard shut down. To do that, hold the power button down for about 5-10 seconds, wait for the computer to shut down completely, then restart it. At that point, you can see if the system has regained normal functionality. If you're still experiencing freezing issues, it could indicate a potential hardware issue, so it's best to shut down the machine entirely.