The main difference between a virus and a worm is how they infect their targets. The virus has to be activated by the user while the worm exploits security vulnerabilities to infect and spread throughout the network on its own.