Pain during sex

I had sex today and before intercourse, my boyfriend was fingering me and it was painful. He kept changing angels, but it was still uncomfortable. Eventually it was all fine and we had sex afterwards. When we finished having sex, I felt a dull pain inside my vaginal canal. It didn't last long, but was something I've never experienced. When I got home I noticed I bit of a swollen bulge inside the opening of my vaginal canal. Does anyone know what might be causing this?