In computer security, an infection is a type of destructive code or program that self-replicates by inserting its code into other programs. Recommended Site As an outcome, infected computer systems can spread the infection to other computer systems.