Pain during sex

So I have only recently become sexually active, within the past few months, but every time I have sex the skin at the back of my vagina, like closest to my butthole, that area there ends up hurting really badly. It goes away within a day. But that’s that only part of sex that has hurt. Is there a reason that’s happening? What can I do to stop it?