Most people think that a computer virus is anything that can go wrong with a computer. When something goes wrong with a computer, it's often said, "I've got a virus!"
In order to browse the internet safely and avoid being "hacked," it should be understood what viruses are and how to avoid them. A computer virus is a software program written to exploit security flaws in Microsoft Windows, OS X (Macintosh), and software in general. If a software program in and of itself causes trouble, that is not a virus, though it might be called a "bug" by some people.
So now that the definition of a computer virus has been made clear, what can be done to avoid contracting a virus and getting "hacked?" The following points are considered best practice and will help though they are not a hard, fast rule:
- Use common sense
- Don't install software from untrusted websites
- Don't save passwords on your computer
- Use browser security extensions
A computer is safe from being infected with a virus when it is not connected to the internet, although it's possible in some rare cases to become infected with a virus without an internet connection. An internet connection from a computer opens the door to the prospect of infection by a computer virus.
The second an internet connection is made, a computer user should proceed with caution. When a website seems odd or has too many flashy, inappropriate ads, that is a flag that the website could be a culprit for infection, directly or indirectly.
Computer hackers can design websites to grab the attention of a computer user in order to persuade her to download tainted software, although a computer hacker can enable a website to outright exploit a security hole in a browser such as Firefox, Chrome, or Internet Explorer. In the latter case, a computer user does not have to download anything but merely has to visit a website to become infected.
In short, don't download anything from a website that is not trusted. Do some investigating to see if there have been any complaints about a website that offers software to be downloaded. One way to accomplish this is to use a well-known browser extension called Web Of Trust. To help avoid those virus infections that occur without downloading anything, browser extensions such as NoScript can help. There is a learning curve to using these browser extensions but it's well worth it.
Many browsers will allow saving passwords for quick access to websites that are visited. For example, a browser will allow saving a password for an e-mail service provider so that a password does not have to be entered every time the e-mail is accessed. It's better to not save passwords in this manner because in the event a computer becomes infected with a virus, the virus could grab those saved passwords and reveal them to a computer hacker.
Antivirus software installed on a computer should be regarded as a last line of defense. It is not by any means meant to substitute common sense and caution when browsing the internet.