Oncogenic viruses contribute to cancer by integrating their genetic material into the host cell's genome, which can disrupt normal cellular functions. This integration can lead to the activation of oncogenes, suppression of tumor suppressor genes, and chronic inflammation, all of which can promote tumorigenesis. For example, HPV is known to produce proteins E6 and E7 that inactivate tumor suppressor proteins such as p53 and Rb, leading to cervical and other types of cancers.