A computer infection is a piece of code that is created to disrupt the normal performance of a computer. Infections can spread rapidly and trigger substantial damage to both individual computer systems and networks. Some infections are harmless, while others can erase files, corrupt information, or even damage hardware.