Computer viruses are malicious software that replicate by altering other programs, leading to various issues like slower performance and unexpected behavior. Types of viruses include boot viruses, program viruses, and macro viruses, while malware encompasses various harmful software like spyware and adware. Prevention measures include installing antivirus software, keeping systems updated, and practicing safe browsing habits.