Viruses are self-replicating computer programs. A virus attaches itself to and becomes part of another executable program to compromise and harm your computer.