In a lot of cases you contract viruses through surfing the internet or in email attachments. A lot of these, if noticed immediately, can be removed in a couple easy steps. I will give a brief description on these steps below but before I do so I need to make a little disclaimer.
Disclaimer: The following information is provided only as such and in no way guarantees that in using the the information as described will remove any and all viruses or protect you from such. Information should be used at your own risk and I take no responsibility if personal data is lost or corrupted or any other unforeseen problems arise from using the information below.
System Restore
Windows system restore will periodically take what is called "snapshots" of your system. For instance if you install a program such as Microsoft Office onto your computer Windows will take a picture of what your system and associated files looked like before the program was installed. The reason that this is done is so that if a file that was changed caused issues with the way your computer functioned then you can choose to return to the "snapshot" or the current state the computer was in before the program was installed. This does so without deleting personal files and documents like music, pictures, email, etc.
Now say you were just surfing the web and somehow a virus has managed to install itself onto your machine and you start getting warnings from your current virus protection (if you have one) or you just somehow become aware of a possible infection. You can use System Restore to go back to a previous time that day or even a previous day (if available). To do this you will need to go to Start -> All Programs -> Accessories -> System Tools -> System Restore. From there you will choose the recommended restore point or the option to choose a different time and date. You computer will restart during the process and let you know when it is done. Then check to see if you notice any signs of the virus and if so try picking an earlier time and date.
Although using system restore will not delete personal files it will remove any programs or updates that occurred after the selected restore time/date. This is something that you need to be aware of. For instance if you installed MS Office on Tuesday at 6:00 PM and later that night had to perform a system restore because of a virus and the closest time you have as a restore point was Monday at 9:00 PM then you will have to re-install MS Office.
Virus Scanner
If you do not have current virus protection I recommend you get one. Which one you choose is really a personal choice, however I do recommend Avast! to most people. Avast! provides a free version for home use and works very well. If you choose to use Avast! I recommend you choose to do a boot time scan (which will be asked once installation is complete and before the computer is restarted). This should remove most if not all viruses you may have on your pc.
