In my opinion, if you didnt fall or did some specific movement in sports and the pain is substantial for several days, I would go see a doctor to eliminate any scary causes like lung infections etc. If you think its a muscle it should react to either cold massages using ice to relieve the pain or a warm bath to release the tension.