Sex hurting

Hi so my boyfriend and I had sex this morning while in the moment I was having so much pain then after I had tons of more pain and had a feeling to throw up and really bad pain does anyone know of this And I had to just lay down and it slowly calmed down