A trojan horse is a piece of code that is designed to interfere with the regular performance of a computer. Viruses can spread out rapidly and cause significant damage to both specific computers and networks. Some infections are safe, while others can delete files, corrupt information, and even damage hardware.