A virus is a small infectious organism—much smaller than a fungus or bacterium—that must invade a living cell to reproduce (replicate). The virus attaches to a cell, enters it, and releases its DNA or RNA inside the cell. The virus's DNA or RNA is the genetic code containing the information needed to replicate the virus. The viral genetic material takes control of the cell and forces it to replicate the virus. The infected cell usually dies because the virus keeps it from performing its normal functions. Before it dies, however, the cell releases new viruses, which go on to infect other cells. However, some viruses do not kill the cells they infect, but instead alter the cells' functions. Sometimes the infected cell loses control over normal cell division and becomes cancerous. Some viruses that do not kill the cells they infect leave their genetic material in the host cell where it remains dormant for an extended time (latent infection). When the cell is disturbed, the virus may be able to begin growing again and cause disease.

Viruses may be transmitted by inhaling, swallowing, or by the bites of insects and other parasites (for example, mosquitoes and ticks). Upon entering the body, a virus triggers the body's immune defenses. These defenses begin with white blood cells, such as lymphocytes, which learn to attack and destroy the virus or the cells it has. If the body survives the virus attack, the lymphocytes "remember" the invader and are able to respond more quickly and effectively to a subsequent infection by the same virus. This is called immunity. Immunity can also be produced by receiving a vaccine.