Lamivudine is an antiviral medication commonly used in the treatment of chronic hepatitis B and HIV infections. It is a nucleoside reverse transcriptase inhibitor (NRTI) that works by inhibiting the replication of the virus, thus reducing the viral load in the body.