What is malware, and what's the difference between a virus, ransomware, and a trojan?

Quick answer

Malware is any software written to do something harmful to you or your device — viruses spread, ransomware encrypts your files and demands payment, trojans pretend to be something useful, and spyware quietly watches; in 2026 most home malware arrives through scam downloads, pirated software, and links in phishing messages, not mystery email attachments.

What it's NOT

Malware is NOT only a Windows problem (Macs, Android phones and increasingly iPhones get malware too), it is NOT always loud and obvious (most modern malware tries to stay quiet so you keep using the infected device), and 'I have a Mac so I'm safe' is NOT a real strategy anymore — Macs are still safer on average but no longer immune.

More context

Malware is the umbrella term for malicious software — anything written specifically to do something to you or your device that you would not have agreed to. Inside that umbrella, the categories are about behaviour rather than appearance:

  • Virus. Malware that copies itself into other files or onto other devices. Pure self-spreading malware is mostly a historical category now; “I have a virus” usually means “I have some kind of malware”.
  • Worm. Malware that spreads across networks on its own, without needing a user to click. WannaCry (2017), NotPetya (2017) are the famous examples — both crossed continents in hours.
  • Trojan. Malware disguised as something legitimate that you install yourself. Most modern home infections are trojans: cracked software, fake VPNs, fake banking apps, fake “free” tools.
  • Ransomware. Malware that encrypts your files and demands payment for the key. For businesses, this is the dominant threat of the last decade; for individuals, it still happens but less often. Either way, the practical defence is offline backups.
  • Spyware. Malware that watches you — keystrokes, screenshots, microphone, camera. Includes commercial stalkerware sometimes installed on a partner’s or child’s phone, which is illegal in most jurisdictions without explicit consent.
  • Adware. Malware whose main effect is to inject ads, redirect your searches, or change your browser settings. Annoying rather than catastrophic, but often a sign that something worse is also installed.
  • Rootkit. Malware that hides itself deep in the operating system to avoid detection. Less common on home devices in 2026; the OS-level defences make rootkits hard.
  • Botnet client. Malware whose job is to silently lend your device’s bandwidth and CPU to a criminal network — usually for sending spam, mining cryptocurrency, or attacking websites.

How malware actually arrives in 2026 — the ranking matters because the defences differ:

  1. Tricked downloads. Cracked games and software, fake “free Photoshop”, fake VPN apps, fake driver-update tools. Easily 50%+ of home infections.
  2. Phishing links and attachments. Documents called Invoice_2026.zip, fake delivery PDFs, links that download an .exe or .dmg you did not realise was an installer.
  3. Malicious mobile apps outside official stores. Android sideloading is the main path; iOS is mostly safe unless the device is jailbroken.
  4. Browser extensions. A well-rated extension can be bought by an attacker, then pushed an update that silently injects malware.
  5. Fake software updates. Pop-ups saying “your browser is out of date” or “Flash Player needs updating”.
  6. Drive-by downloads on shady sites. Less common now thanks to modern browsers, but still occasionally a path on outdated systems.

What to do when you suspect an infection:

  • Disconnect from the internet if you suspect active ransomware or data theft — pull the Wi-Fi, unplug the cable.
  • Run a scan with the built-in antivirus (Defender on Windows, the platform’s own protections on Mac). Add a free reputable second opinion (Malwarebytes is the well-known one for home use).
  • From a different, trusted device, change passwords on important accounts (email, bank, password manager). Do not trust the possibly-infected device for password resets.
  • For ransomware, do not pay first. Most reputable backups (Time Machine, Windows File History, cloud backups with version history) let you restore. The decryption keys for many ransomware families are now public on nomoreransom.org.
  • For phones, factory reset is the brutal-but-reliable answer if scans are inconclusive.

Prevention is almost entirely about behaviour: install software only from official stores or known publishers, do not pirate software, treat unexpected attachments as guilty until proven innocent, keep the OS up to date, and keep an offline backup of irreplaceable files (photos, documents).

People also ask

What is the difference between a virus and ransomware? +

A virus is malware that copies itself from file to file or device to device — the spreading is the defining trait. Ransomware is malware whose goal is to encrypt your files and demand payment for the key. Some ransomware also spreads like a virus (WannaCry, NotPetya), but most modern ransomware is delivered manually by attackers after they have already broken in. So a virus describes *how* malware moves; ransomware describes *what* malware does.

What is a trojan? +

A trojan (short for 'trojan horse') is malware that pretends to be something useful — a cracked game, a fake VPN, a 'free Photoshop' download, a fake banking app on Android — so that you install it yourself. There is no spreading involved; the trick is convincing you to invite it in. Most modern home malware is delivered this way, plus malicious browser extensions and fake software updates.

How does malware get on my computer or phone in 2026? +

Five main ways: (1) downloading pirated or cracked software, (2) installing fake apps from outside the official app stores, especially on Android, (3) clicking links in phishing emails or SMS that download a 'document' or an 'invoice', (4) malicious browser extensions, (5) fake software-update pop-ups ('your Flash Player is out of date'). 'Old-school' email attachment viruses still exist but are rare for ordinary households; the modern threat is social, not technical.

What are the signs my device might be infected? +

Honest answer: modern malware tries hard not to give signs. The unreliable hints — sudden slowness, weird pop-ups, the browser homepage changing, battery draining unusually fast, mysterious files appearing — are worth investigating but often have other causes. The reliable signals are: an antivirus alert, your bank flagging transactions you did not make, friends saying you sent them strange messages, or a ransom note on screen. When in doubt, run an antivirus scan and change important passwords from a different, trusted device.

Do I still need antivirus in 2026? +

On Windows, the built-in Microsoft Defender is genuinely good and is enough for most households — you do not need a paid product on top. On Mac, the built-in protections (XProtect, Gatekeeper) plus careful behaviour are usually enough; a free reputable scanner can be added for peace of mind. On Android, install only from the Play Store and keep Play Protect enabled. On iPhone, third-party antivirus is mostly theatre — the OS sandboxing makes traditional malware very difficult. See [antivirus](/en/library/everyday/antivirus/) for more.

Also explained