If your computer screen freezes it means that the window is not responding or the program is not responding. Fist just go to task manager and click the applications now you can see the program that is running and the program that is not responding, click the proram that is not running and click the end task and wait until the program close. after that reboot your computer(restart) .
After you finished restarting your computer just scan it with your antivirus, after scanning you must clean your RAM to improve your PC/Laptop and to prevent in screen freeze and crash. It is advisable to clean your RAM to optimize your system. There are many ways in improving RAM Is either a software or manual improving. For the software use RAM optimizer or RAM cleaner to improve its perfirmance. In manul cleaning the ram just open a notepad file and paste this freemem=space(64000000) and save it as RAMcleaner.vbs. After saving it just double click the file and that’s it your computer will have more free ram and run faster.