There are many resources and things you can try, I've been with my boyfriend since October and we've only just been able to finally have sex for the first time this month!
Doctors can offer a diagnosis, a pelvic exam (which i refused as the speculum would only make it tighter and worse x) and trainers/dilators.
I went at it alone and me and my partner decided to try and figure it out ourselves.
I brought myself some dilators off amazon, we started off with fingering, built ourselves up, communicated, took it each step at a time and now we're here, granted sex does sometimes hurt a little, but its not bad pain and i can deal with it and still feel pleasure.
dilators may help you, and so may one finger, and eventually two, and so on, however.
It's important to address why you have this issue as it will help you overcome it, if you are unsure therapy can help and so can talking to your partner, trust, patience, and the ability to relax really helps x