Try putting phone in download mode and see if it stays on:
To put in download mode press the power+home+volume down button together, then it will show the download mode and press the volume up button to enter download mode.
Leave it on that mode for a little bit and see if it turns off. if it does then the problem is the motherboard and should be covered under the manufacture warranty. You can contact samsung or your provider for that.
If it does not turn off then put your phone in recovery mode and reset the phone and wipe cache. to put in recovery
Turn off your Samsung Note 5.
Press Power , Home and Volume Up buttons together and hold them.
Once you see the Android System Recovery screen, release the buttons.