Pain during intercourse

Mari
During sex it felt like my husband was hitting something this only happens occasionally but now my pelvic area is hurting any idea what that is?