Lamivudine is an antiretroviral medication used to treat HIV/AIDS and hepatitis B. It is a nucleoside reverse transcriptase inhibitor (NRTI) that interferes with the replication of the virus by inhibiting the reverse transcriptase enzyme. This drug is crucial in managing these viral infections, often in combination with other antiretroviral agents.