In computer system security, an infection is a type of harmful code or program that self-replicates by placing its code into other programs. As an outcome, contaminated computer systems can spread the infection to other computer systems. A bug is a type of malicious code or program that, when executed, duplicates by inserting itself right into other computer system programs, data documents, or the boot field of the hard disk. Therefore, trojan horse can spread throughout a network of computer systems as well as trigger severe damages.
reference