Viruses attach to cells when viral proteins successfully bind to receptors on the host cell. If the viral protein has the right shape, it will tuck into the cor responding shape on the host cell receptor. You can think of viral attachment as a virus having the right key to fit into the lock on the host cell.
After the virus is attached, it may force itself into the cell by digging a hole through a cell wall slip in by fusing its envelope with the membrane of the host cell, or trick the cell into bringing it inside.
The ability of a virus to infect a host cell depends on a match between pro teins on the surface of the virus and receptors on the surface of the host cell.
The type of cells a particular virus can infect is called the host range of the virus. Because viruses can infect only cells that they can attach to with their proteins, each virus has a very specific range of hosts it can infect. In other words, each virus can infect only the host cells for which it has keys.
Some viruses have a key that works in the lock on many types of cells. These viruses have a broad host range. For example, the rabies virus can infect humans and many other mammals. On the other hand, some viruses have a key that fits into the lock on only a few cells. These viruses have a narrow host range. The HIV virus, which infects only certain cells of the human immune system, is a good example of a virus with a very narrow host range.