Valtrex is an antiviral medication. Antiviral medications are used to treat infections caused by viruses, while antibiotics are medications used to treat infections caused by bacteria. Valtrex is not an antibiotic but treats infections similarly to antibiotics.