If you’re in actual pain, try some lube and communicate with your partner. But if you have significant pain that occurs frequently or doesn’t go away, definitely consider seeing a medical professional, as there are many treatable reasons you could be experiencing pain during sex.