The primary risk factor for cervical cancer is infection with HPV. Other risk factors include smoking, having a weakened immune system, long-term use of oral contraceptives, and engaging in early sexual activity or having multiple sexual partners. Women with a family history of cervical cancer are also at increased risk.