Acyclovir is an inexpensive drug used to treat or prevent infections caused by certain kinds of viruses. Examples of these infections include herpes and shingles. This drug is slightly more popular than comparable drugs. It is available in generic and brand form. Generic acyclovir is covered by most Medicare and insurance plans, but some pharmacy coupons or cash prices may be lower.