A system restore puts your computers settings back to the restore date. This does not touch your personal files. That means if you added a file today, and you do a system restore to 3 days ago, your file is still there. A system restore does effect added programs, which is why it can help fix problems with a virus or program that is causing problems. Unlike your files, if you add a program today and do a system restore to 3 days ago, that program is no longer installed on your system. The program files are still there, but it is no longer a part of the system. You would need to reinstall any affected program. A computer virus is a type of program, a bad type, but still a program.
Refer to this guide for running a system restore from Windows in Windows 7 or earlier.
Windows 8/8.1/10 requires you go to Settings > Update & Security. Pick Recovery from the side menu, and pick Advanced Startup from the Recovery Options.
If you use 'Advanced Startup', the computer will restart and bring you to the recovery options screen.
The 1st screen has 4 options, pick TROUBLESHOOT. This is where you will see the option for SYSTEM RESTORE.
You can run a System Restore outside of Windows by using a Windows Disc or Rescue disk, you will need to boot from the disk. Remember, if you are using a Windows Install disc, choose 'Repair Computer', not 'Install Now'. System Restore will be part of the Repair Options menu.