If your chest hurts when you breath and your head hurts as well, you should go to the emergency room. If you can not go right now, you should at least have someone around you to make sure your OK.
Chat with our AI personalities
If you have pain with every (deep) breath two possibilities come to mind: pleurisy or arterial obstruction. If it continues you will discuss it with your doctor, won't you?
You may pleurisy, an inflamation of the lining around the lungs. This can be extremely painful. I know, I contracted it on a trip when I was a boy.