Urgent. You may be having a bleeding ulcer. If you feel weak, lightheaded, short of breath or in a lot if pain go to the emergency room. If not see your doctor very soon.
Ulcer maybe. There are lots of causes of pain in that area but if you have black stool it suggest bleeding so you may have an ulcer or some other problem with the gastrointestinal tract leading to bleeding. You need an immediate check up to see if you are bleeding and if you are anemic.