You may have to just let it run out of power, then plug it in to charge and leave it turned off while it does.
If it happens again, once you restart it, repeat this and then when you go to start it up, start in "Safe Mode". If it runs fine (not including the facts that many apps will not run in "Safe Mode") and doesn't freeze while in there, then you have a bad app, virus, malware, etc., on the device that you need to remove.
To get into "Safe Mode" please do the following.
1. First turn off the tablet.
2. Next press and hold "Power" until you see the manufacturers logo on the screen, then release the power button.
3. "Quickly" press "Volume Down" and hold it for few seconds until you see the message "Safe mode: ON" or something similar.
4. If you wanted disable it, simply repeat the steps above, and you should see "Safe Mode: OFF" rather than on.