Viruses infect computers to erase critical information, steal personal data, or send unwanted pop-up ads to users. They can be extremely costly, due to both files being deleted and time spent removing the virus.