My partner has really bad stomach pain, it hurts him to walk, eat, drink hot fluid and it's there all the time, he has black stools what could it be?

Ulcer or UGI bleed? It would appear that your partner might be bleeding internally in the upper gastrointestinal tract. The black stools are called, melena and are indicators of upper GI blood loss caused by digestive action on hemoglobin. For example, blood from the large intestine will dark purple and smells foul. Bright red would suggest bleeding close to or in the anus. He should have this evaluated.
Gastritis or ulcer. He may have gastritis or stomach ulcer. Taking too much Ibuprofen is a risk factor for developing that above conditions. He needs to see a gastroenterologist asap or get a referral from primary care doctor as he may be bleeding inside, which causes stool to be black.