A virus is a piece of code that is created to interfere with the normal performance of a computer. Viruses can spread out quickly and cause significant damage to both individual computers and networks. Some infections are safe, while others can erase files, corrupt information, or perhaps damage hardware.