A virus recognizes a host cell through using its outer membrane equipped with glycoproteins to bind with receptors on the surface of the host cell. Glycoproteins are structures on the virus's outer surface that are used to recognize and signal cell to cell interactions. A virus is enveloped with a membrane with these protruding glycoproteins as it roams inside of a biotic environment.
Once the glycoproteins are able to detect a host cell that is void of a viral genome, the glycoprotein binds to the surface of the host cell. Once bound to the host cell, the viral envelope fuses with the host cell's plasma membrane and transfers the viral genome inside to start the viral infection.
This interaction between the viral glycoproteins and the receptors on the surface of the host cell mimics a lock and a key. If the viral glycoprotein provides a key that is able to pick many different cell surface receptor locks, then the viral host range is high.
An example of a virus recognizing its host cell is HIV only binding to the CCR-5 regions on a white blood cell. The glycoproteins sticking out of the membrane of the HIV virus attach to the CCR-5 region like a lock and key to open the door to inevitable AIDS.