A bug is a piece of code that is created to disrupt the typical functioning of a computer. Viruses can spread out quickly and trigger substantial damage to both individual computers and networks. Some viruses are safe, while others can delete files, corrupt data, or perhaps damage hardware.