A virus is a small piece of software that inserts copies of itself into other executable programs and code in order to spread. It piggybacks on real programs to execute. There are several types of viruses including boot sector viruses, which infect the boot sector and slow down or stop system operations, and macro viruses, which are associated with applications like Word and Excel and destroy data when an infected document is opened. It is important to take actions like updating anti-virus software weekly, having backups, and being cautious of unexpected email attachments to prevent virus infections.