If there is a history of trauma it could be a rib fracture, if
not it could be pleurisy (inflammation of the tissue covering the lungs
due to an infection). If it is at the back then it could be a kidney
infection too.
The bottom line acording to me is that if it hurts real bad, it is NOT
good news, you need to be seen by a doc ASAP. I would consider going to
the ER for help,
Please ACCEPT the reply, and give a BONUS if it was useful. If you
need more information, just let me know.
Regards
Dr. Gupta