A virus is a tiny infectious agent that replicates inside the living cells of organisms. It is composed of genetic material, either DNA or RNA, enclosed in a protein coat.