sex problems

My boyfriend is leaving me because I don't give him sex. But it hurts every time we have sex, I tried to fix it but idk what the problem is