An infected file is a file that has been impacted by a computer virus in any of several ways. Anti-virus technologies work to quarantine an infected file, and may, in some cases, repair the file by removing the virus code. Infected files often come from remote sources through downloads to infect a host computer.
There are many different kinds of viruses, and they can infect a file in different ways. Some viruses are built to derail and take over the actual function of a file, such as an executable file. Others simply reside within a file. Some viruses, called parasitic viruses, often attach code to different parts of a file, but remain inactive or otherwise invisible to a basic search or inspection of the file.
Other kinds of infections involve deceptive duplication of files and other unusual code alterations. Anti-virus scanners and programs must be constantly updated to catch the many different kinds of viral file infections that are regularly created by hackers. Although infected files can often be contained and repaired or deleted, some are hard to contain, since internal code acts quickly and can have a devastating effect on an operating system.