The big problem with viruses is that they can only replicate inside the cells of other living things. Once a virus gets inside a cell, it hijacks the cell’s own DNA replication and protein making machinery to make more viruses instead.
The aim of most anti-viral drugs is to stop the viruses replicating but most things that stop the virus replicating also stop the host cell’s machinery. This means that things that stop the virus usually do some damage to the person infected too. This is why most anti-viral drugs are somewhat toxic to take.
A major difficulty with curing a virus is that viruses have a tendency to mutate extremely rapidly. This is especially true for viruses like HIV which mutate so rapidly that developing a cure is often described as hitting a moving target.
Every time a virus replicates its genetic material gets copied, for animals there are special chemicals within the cell that do a sort of double check of this replication. These this process is called proofreading and the chemicals that do the job are the same ones that control the duplication of DNA the proofreading job is sort of a bonus that enzymes (chemicals) do.
In many viruses (not all) there is no proofreading, and so for these viruses every time they replicate errors in the replication will cause mutations. Many of these mutations mean that the virus can’t actually form and so they are bad for the virus as a whole, but some not only allow the virus to form but even change the nature of the virus. Some of these mutations can help the virus avoid the immune system and some can even change the way the virus infects…possibly allowing it to infect cells or animals that it couldn’t infect before this is often what happens when a virus jumps to a new species. The fact that HIV mutates so quickly both makes it hard to cure and also is what has allowed it to spread as rapidly as it mutates and adapted to humans.
Viruses are not like our cells, they cannot function on their own. Whilst they are out of a host they can quickly be killed using chemicals etc but once they are inside of a host it becomes much more difficult as Hannah says they hijack your own cells and so it is difficult to target viruses separate from our own cells.