If you have a cold it is possible you have pulled a muscle form coughing, it is quite painful but it will go away eventually.
OR
You might have a chest infection, You should go to the doctors.
this could be your gallbladder. you should consult your primary care physician.
Many things such as: 1) Costochondritis 2) Torn/pulled muscle between the ribs 3) Heart Attack 4) Pulmonary embolism 5) Broken Rib
it means you have cancer
possible broken rib
If you eat just before excersicing you can have what you described. Otherwise I don't know...
Repairing Ribs
How to Repair Cracks in Walls
How to Determine Middle Back Pain Causes
Heel Pain Caused by Sports