Answer:
I get cortisone injections and use a rib belt
The best thing to do is to have an evaluation by a primary care provider, like a medical doctor or a chiropractor to make sure there nothing more serious going on, like a fracture or a complete dislocation. The chiropractor may try to adjust it and put it back in place. But most often, the best treatment is time. The rib will naturally find its way back into its spot after the muscles associated with it have stopped being in spasm. Massage will probably not help, either. If you are having problems with activities if daily living, like putting on your cloths, eating, brushing your teeth, etc, then it probably is a good idea to see a primary care provider, otherwise, let nature do its thing and it should go back in place in a few days.
I don't know if this is an "improvement" to the answer, but here's what worked for me. I couldn't breath deeply without some serious pain. I was dealing with a head-and-chest cold and needed to have productive coughs to clear my chest. That wasn't a problem, as I didn't need to breathe deeply to be able to cough that way. But one time, unexpectedly and involuntarily my body forced me to breathe deeply on a cough, and it was sharply painful, so much so that I forgot to cough, but as I breathed in deeply quickly, I felt a "pop" exactly where the pain was. At first I thought I hurt myself further, but immediately thereafter I was able to breath deeply on demand and with zero pain. So all I can say is, what worked for me was a quick, sharp, and full breath sucked in. It popped whatever was out of place, into place. Purely by luck.
Unless there are contributing factors, the usually resolvey naturara methid.