This is my first post here, so excuse me for its simplicity.
Viruses can infiltrate a cell, overtake it and multiply. It has projecting fibers whose ends are shaped as kind of a "key" to a mobile sentry on the cells membrane so it can be permitted access into the cell. When it enters the endosome of a cell, a protein pump blows an acidic gas onto the virus to break it down, thinking it's a special nutrient. But the virus expects this of course, and when the protecting fibers break off (and so too the body of the virus) proteins are released that rips apart the skin of the endosome so the virus can escape.
These are just two of many things the virus does to compromise a cell. Its entire existence is for the sole purpose for infecting a cell, and it seems to know how to do that perfectly. How did the virus evolve to know how to do things like this?