It could be a few things that are causing it. Bad app, wrong lock code, virus, malware, other glitch, etc. You may well need to restart the tablet to get it to unfreeze. If you have trouble turning it off, then you may well have to wait for it to run out of power first.