Contractions

Im almost 25 weeks pregnant due July!! Sometimes i get this really bad pains in my stomach and then goes to my back amd only lasts about 2 min!! Are these contractions im so confused it doesn’t happen all the time just sometimes and it freaks me out !!