Computer enters blue screen mode

Good day everyone.
I would like to ask for help regarding this computer which I just purchased just 2 months ago. I don’t know what happened but it all started when I installed a game called Diablo. After that my computer suddenly stops responding and will enter blue screen mode.
I removed this game but the error stayed. Now, I cannot play a game straight because of my computer constantly shutting down.
Sometimes it will shut down after 30 minutes but sometimes it stays on up to 3 hours then shuts down again.
This restarting of computer on its own is driving me mad.
Can anyone please help me solve this problem?
What can possibly the cause of this error?
