Is there any history of trauma or injury to the site? Did you have cough
in the recent past? Does the pain increase on coughing etc?
There could be several causes for your complaints - you should consult your doctor to rule out abdominal causes like GERD, gastritis, cholecystitis, etc.
Repiratory causes could be rib fracture, pneumonia, etc.
It could also be due to a muscle pull or sprain.