mgl has the basics right and it applies to all the current antivirals we use for herpes since they all have the same basic action and differ in the delivery method. The active ingredient in all three of them interferes with the replication of the virus inside an infected cell. When the DNA chain divides to begin viral transcription, the active ingredient latches on to the end of the broken DNA chain to keep it from recombining to form a new viral unit. See - http://www.racoon.com/herpes/BH/Hvinfo2/sld041.htm
As mgl says, if there is no viral thymadine kinaise reaction going on, the acyclovir has nothing to react with. It's a very targeted approach so it is a drug with very few side effects. It's so safe that it's routinely given during pregnancy for mothers who are having trouble with active OBs. Gertrude Elion and George Hitchings, who developed this approach, resulting in acyclovir becoming available in 1977, were awarded a Nobel Prize for their work in 1988.