There’s a dozen things that could be causing that, most of them easily fixed. But I’m afraid the only way to be certain is a trip to the doctor.
I know that can be awfully embarrassing but remember it’s nothing to them, they are talking about it every day. It’s nothing more than you saying your throat hurts and them figuring out why. And yes, don’t be shy to say it’s when it gets penetrated, they need to know the facts to help you, and everything you say to them is confidential.
Have a look at this to read a bit more about it but really an actual medical check is the only thing that’s going to definitely help.
If you’re a virgin then you could be hitting or stretching your hymen (not covered in that list). For more info on that watch this fabulous video:
Your body is amazing, it’s great that you’re exploring new sensations, but you need to look after it too, so be brave and go and get a check up (and avoid using the dildo till you have!).