If it isn't overheating, then I would suggest you do some good deep scans for viruses and malware. Should you not find anything, try loading the computer in "Safe Mode" and see if it runs fine.
NOTE: A lot of programs won't work in "Safe Mode". It restricts access to programs to help you repair and resolve issues. If the problem involves any installed programs, and it doesn't happen in "Safe Mode", then I would suggest removing those programs, and see if things improve.
How to enter "Safe Mode" when booting the computer.
In Windows 8 and 10...
As your computer restarts, press F8 (possibly a few times) to enter "Safe Mode"
a. Press the "F4" key to Enable "Safe Mode".
(The computer will then start in "Safe Mode" with a minimal set...