It could be a few things. Stuck button that won't power off. Installation of a bad app or downloading a virus or malware. Any of those could cause it. You are, if the button isn't stuck, going to have to wait until it loses power completely and then charge it while off. Do not turn it on normally, but instead turn it on in "Safe Mode" so you can see if it will turn off fine then. If it will, then you have something installed that needs to be removed. Turn it back on in "Safe Mode" again and uninstall anything that you installed, or downloaded, or updated, just prior to the start of the problem. Restart the device to exit "Safe Mode" and if the item(s) removed were the issue, the tablet should work fine.
To get into "Safe Mode" please...