A trojan horse is a piece of code that is designed to disrupt the regular functioning of a computer system. Viruses can spread out quickly and trigger substantial damage to both specific computer systems and networks. Some viruses are safe, while others can delete files, corrupt information, and even damage hardware.