A virus is a type of malware that spreads by infecting files and programs on a computer system. It typically requires user interaction, such as opening an infected email attachment or downloading a malicious file from the internet. A worm, on the other hand, is a self-replicating type of malware that spreads through network connections without requiring user interaction. Worms can spread rapidly and can cause significant damage to computer systems and networks.