How to loosen up on your own?
With your partner?
LOT’S AND LOT’S OF FOREPLAY. THIS IS CRUCIAL.
You have to take it really slow and work your way up to it. Rushing is the absolute worst thing you could do. Rimming, stretching your asshole, lubed up fingers, even slapping your ass, all of that will help your sphincter relax and prepare itself. You, yourself, also need to be relaxed otherwise it’s just not good. So try having your partner eat you out while playing with your ass, that way the combined pleasure and stretching/finger play will open you up and relax the muscles there.
KEY PHRASE: If it hurts, don’t force it.