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 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.