Viruses are programs that infect other programs by attaching themselves and executing their code without the user's knowledge. They have destructive behavior, rely on hosts to survive and spread, can protect themselves from detection and removal, and come in many forms. Viruses have two phases - an infection phase where they infect other programs each time they are executed or upon a certain trigger, and a payload phase where they carry out their intended harmful actions. Some viruses reside in memory like terminate-and-stay-resident programs to wait for events like inserting disks or copying files to infect other programs, making them difficult to detect.