It could be a few things, including malware, adware, a virus, etc. Or it could be a hardware issue.
First I would try running full scans for anything malicious on the laptop. You also may want to try and run it in "Safe Mode" to see if the problem continues to happen in there. If it doesn't then there is definitely something on the computer. If it doesn't run fine in "Safe Mode", then I would start looking at hardware as the issue.
How to enter "Safe Mode", from within windows.
In Windows 8...
1. Go to "PC Settings".
2. Click "Update & recovery".
3. Next click "Recovery", and then under "Advanced startup", click "Restart Now".
4. Once the "Choose an Option" screen opens, click "Troubleshoot".
5. Now click "Advanced Options", and then "Start-up Settings".
6. Then click "Restart".
7. The computer will restart, and load the "Startup Settings" screen.
8. Here you will make your "Safe Mode" option choice. Your choices are:
a. Press the "F4" key to Enable "Safe Mode".
(The computer will then start in "Safe Mode" with a minimal set of drivers and services.)
b. Press the "F5" key to Enable "Safe Mode" with Networking.
( Once "Safe Mode" with Networking starts, Windows is in Safe Mode, with additional network and services for accessing the Internet and other computers on your network.)
c. Press the "F6" key to Enable "Safe Mode" with Command Prompt.
(In "Safe Mode" with "Command Prompt" starts Windows in Safe Mode, with a Command Prompt window instead of the Windows interface. This option is mostly only used by IT professionals.)
9. Now sign in to the computer with your account name and password. (If you have one set.)
10. When you are finished troubleshooting, you can exit "Safe Mode" restarting your computer.
In Windows 10...
From Settings.
1. Press the "Windows logo key" + "I" on your keyboard to open "Settings". Should this not work, Click the "Start Button" in the lower-left corner of your screen, then select "Settings".
2. Click "Update & security" and then Recovery".
3. Under "Advanced startup", select "Restart now".
4. After your computer restarts, it will take you to the "Choose an option" screen. Here you will select "Troubleshoot" and then "Advanced options"
5. Then click "Startup Settings" and finally "Restart".
6. After your computer restarts, you will see a list of options. Select "4" or "F4" to start your in "Safe Mode". Or, if you will need to use the "Internet", select "5" or "F5" for "Safe Mode" with Networking.
From the Sign-In Screen.
1. Restart your computer.
2. When you get to the "sign-in screen", hold the "Shift key" down while you select "Power" and then "Restart".
3. After your computer restarts, it will go to the "Choose an option" screen. Here you will select "Troubleshoot" and then "Advanced options".
4. Then click "Startup Settings" and finally "Restart".
5. After your computer restarts, you will see a list of options. Select "4" or "F4" to start your in "Safe Mode". Or, if you will need to use the "Internet", select "5" or "F5" for "Safe Mode" with Networking.