First off the basics if not already done:
Perform a system maintenance/ check-up. This includes error checking and defragmenting drives, and also checking for malware with something like Malware Bytes.
Check the case for dust and give the CPU and fans a good clean with a can of compressed air.
Make sure all fans are spinning.
It might also be time to do a fresh install of Windows.
When the computer Blue Screens what is the message on display?