Oncogenic viruses can cause cancer through several mechanisms: - Integration of viral DNA into the host genome, disrupting normal gene function. - Expression of viral proteins that interact with and inactivate tumor suppressor genes, such as p53 and Rb. - Chronic inflammation induced by persistent viral infections, which can lead to DNA damage and cellular transformation.