What Is a Computer Virus?

A computer virus is a malicious program or type of code designed to disrupt the way a computer functions. Viruses are written to spread from one computer to another and to self-replicate. A computer virus works by attaching itself to a legitimate document or program to activate the infected code. If activated, the virus can damage software, corrupt data, or destroy information.

Master your smart devices with our weekly newsletter
Sign up to get the latest smart home tips and reviews directly in your inbox.

By signing up, you agree to our Terms and Conditions and Privacy Policy.

How Do Computer Viruses Attack?

Computer viruses remain dormant until their code is activated. This means viruses can lie in wait—attached to a file or document—until you run the infected program. While the virus is dormant, it can be difficult to detect. But once your computer is infected, any other devices on the same network are also vulnerable to infection. The amount of devastation varies from virus to virus, but some of the most common things a virus can do are listed below.

  • Log keystrokes
  • Steal passwords
  • Send spam email (with infected code) to your contacts
  • Access and steal data
  • Corrupt files
  • Completely take over your computer

Some computer viruses are designed to create mischief (like turning all of your files into pictures of squid), which is irritating, but usually manageable. But other viruses target financial data or aim to destroy your hard drive.


Compare the best online security products

Brand
Best for
Starting price
Specs
Standout feature
Learn more
Read review
BarkBark
Best parental control Unlimited devicesEmail and social media monitoring
BitdefenderBitdefender Total Security
Best antivirus/malware software Protects up to 5 devices Includes VPN and parental controls
Nord VPNNordVPN
Best VPNWorks on 6 devices 5,100 servers

60 countries

Identity Force Logo 2019IdentityForce
Best identity theft protection

$1 million recovery insurance

Two-factor authentication
DashlaneDashlane
Best password manager Unlimited devices with Premium plan VPN and dark web monitoring with Premium plan

Data as of post date. Offers and availability may vary by location and are subject to change. SafeWise uses paid Amazon links.

*Amazon.com price as of 4/8/2021 at 9:10 a.m. (MT). Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply to the purchase of this product. Safewise.com utilizes paid Amazon links.

Rebecca Edwards
Written by
Rebecca Edwards
Rebecca is the lead safety reporter and in-house expert for SafeWise.com. She has been a journalist and blogger for over 25 years, with a focus on home and community safety for the past eight. Rebecca spends dozens of hours every month poring over crime reports and spotting trends. Her safety expertise is sought after by publications, broadcast journalists, non-profit organizations, podcasts, and more. You can find her expert advice and analysis in places like TechCrunch, The Washington Post, The Chicago Tribune, The Miami Herald, NPR, HGTV, MSN, Reader's Digest, Real Simple, and an ever-growing library of radio and TV clips.

Recent Articles

security system being installed on wall
Best DIY Home Security Systems of 2021
DIY install home security systems are cost-efficient, effective, and easy to install. See which DIY...
SimpliSafe hub on kitchen counter
Abode vs. SimpliSafe
SimpliSafe triumphs over Abode, but it wasn’t a clean sweep. Learn more about the key...
Large craftsman style house at twilight with lights on
Best Home Security Systems of 2021
After hundreds of hours of tests and research, plus a combined 50+ years of experience,...
Mother looking at security system app with family
The Best Home Security System Apps
Home security apps help you protect your home when you’re not there by letting you...