Denialism has posted a succinct description of the relationship between HPV (human papilloma virus) and cervical cancer.
So how can a virus like HPV lead to cancer? The short answer is simply that "HPV causes cervical cancer by screwing with two of our most powerful tumor suppressor genes." The long answer is really worth reading though, so go to!
(Image via the CDC)