Virus: It is a type of malware that spreads by embedding a copy of itself and becomes a part of other programs. Viruses spread from one computer to another while sharing the software or document they are attached to using a network, file sharing, disk, or infected email attachments.
Worm: These are similar to viruses and cause the same type of damage. They replicate functional copies of themselves and do not require a host program or human help to propagate. Advanced worms leverage encryption, ransomware, and wipers to harm their targets.