Acyclovir is an antiviral medication primarily used to treat infections caused by the herpes simplex virus (HSV) and varicella-zoster virus (VZV). In the context of gynecology, it is particularly effective in managing genital herpes, a common sexually transmitted infection.