Lets start with the definition of a virus (from the Wikipedia page on viruses):
A virus is a small infectious agent that replicates only inside the
living cells of other organisms. Viruses can infect all types of life
forms, from animals and plants to bacteria and archaea.
So basically speaking you have a piece of genetic information (DNA or RNA) which encodes proteins which are important for the function of the virus and a hull (not always, but mostly). These invade a cell type, take over the cell (litarally, after an infection the cell will mostly only make viral proteins and DNA/RNA). Finally new viruses are built inside the cell and released to infect more cells. In principle this works like in the figure below (from here):
There are two possibilities for cures: The first one are vaccinations. Here you either use dead or attenuated viruses (or parts of viruses) to train the immune system. When this has happened, the immune system "knows" this specific agent and can rise a fast and highly specific immune answer against it, before the virus can replicate in high numbers and infect a lot of cells. This happened for example for the small pox virus which could be eradicated from the human population.
The other would be drugs which either target a virus (or some of it functions) specifically or prevent them from spreading. The immune system usually does the final cleanup here.
Both methods only work for people which either take the drug or are vaccinated, so they have no influence on the virus in people which are not protected. For further information have a look on the Wikipedia page on Viruses.