This is essentially achieved by a series of correct software being installed plus very careful choices of what to do and what not to do whilst you are actually on line or connected to the internet. Further you should also consider reconfiguration of you internet browser to make it harder for viruses to get on to your computer.. It is a good idear to configure your browser so that any redirection of the browser is notified to you, that at least lets you know if your are going to be redirected to a different web site or page! This subject is a big one, so expect to see other pages about the same subject at Chephrenrepairs.com.
You should have a proper software firewall that is set to tell you what is going in and out of your computer, so configure it to show you messages when programs try to download stuff as well as when anything leaves you computer. Make a point of trying to learn exactly what these messages actually mean.
You should have a paid for antivirus program and update that on a daily basis if you use the computer on a daily basis, that is a minimum requirement. Clearly make absolutely sure that you pay for the updates before the subscription for them runs out.
It is not enough to have a program on your computer that just looks for Viruses it must look for Spyware and Adware also as well as Viruses.
Use that thing called Windows Update, to fully update your operating system, you should do this at least every month. This will help for sure.
Anything that pops up in your Web browser at all that says you need any software to scan or to speed up your computer or to make something else work should be completely ignored absolutely…. If you need to get some software you can go directly to the website of the manufacture of that software and download it from there.