The primary risk factor for cervical cancer is infection with the human papillomavirus (HPV). Other factors include smoking, having a weakened immune system, long-term use of oral contraceptives, and having multiple full-term pregnancies. Regular Pap smears and HPV tests are crucial for early detection.