Gene therapy involving viruses relies on the viruses' ability to hijack cells. The virus acts like a revolutionary group that takes over the machinery of the cell and starts producing copies of itself with it. It does this by "injecting" its own blueprints into the "factory" of the cell to crank out copies of itself.
Gene therapy takes advantage of this ability and uses the viruses' ability to inject therapeutic genes information into the cell. This works best when used against some kind of disease that is the result of a single genetic malfunction, such as cystic fibrosis.
In a best case scenario, the virus will inject into the cell the correct gene, which will then be replicated (rather than the cell replicating the abnormal gene it had before.) In time, and via medical magic, the correct gene can supplant the malfunctioning gene.
It's not a perfect system, yet. The body, by nature, does not like viruses and seeks to destroy them. The viruses also have to be carefully constructed or else they will mutate, cause illness, or target the wrong type of cell (if applicable.)
Overall, viruses present a unique and exciting avenue for scientists to explore when combating genetically caused diseases.