A computer virus is a computer program that can replicate itself and spread from one computer to another. The term “virus” is also commonly used to refer to types of malware, often referred to as adware and spyware programs that do not have the reproductive ability. Viruses can increase their chances of spreading to other computers by infecting files on a network file system or a file system that is accessed by another computer.
A computer worm is a self-replicating malware computer program, which uses a computer network to send copies of itself to other computers /nodes on the network without any user intervention. Unlike a computer virus, it does not need to attach itself to an existing program. Worms almost always cause at least some harm to the network, even if only by consuming processing power or bandwidth, whereas viruses almost always corrupt or modify files on a targeted computer.
A Trojan horse may allow a hacker (also known as a computer criminal), remote access to target your computer system. Once a Trojan has been installed onto your computer system, a hacker may have access to your computer remotely and then will be able to perform various operations, limited by user privileges on the target computer system and the design of the Trojan.
Operations that could be performed by a hacker on your computer system include:
Trojan horses require interaction with a hacker to fulfil their purpose, though the hacker need not be the individual responsible for distributing the Trojan horse. It is possible for individual hackers to scan computers on a network using a port scanner in the hope of finding one with a malicious Trojan horse installed, which the hacker can then use to control the target computer.
Spyware is a type of malware that can be installed on computers, which collects small pieces of information about users without their knowledge. The presence of spyware is typically hidden from you, and can be difficult to detect. Typically, spyware is secretly installed on the user’s personal computer. Sometimes, however, spywares such as key loggers are installed by the owner of a shared, corporate, or public computer on purpose in order to secretly monitor other users.
The following video from KaperskyLab explains