A virus is a piece of code that is created to disrupt the regular performance of a computer system. Viruses can spread out rapidly and trigger considerable damage to both private computer systems and networks. Some viruses are safe, while others can delete files, corrupt information, and even damage hardware.