A virus is a microscopic infectious agent that can only replicate inside the living cells of an organism. Viruses can infect all types of life forms, including animals, plants, fungi, and bacteria. They are composed of genetic material, either DNA or RNA, surrounded by a protein coat called a capsid. Some viruses also have an outer lipid envelope.