Small bowel obstruction. It occurs in the small intestine, basically nothing can get past the blockage, so it remains and causes a lot of pain and nausea. If it’s minor, we just give the patient gut rest, nothing to eat or drink until it resolves. Next step is generally a nasogastric tube insertion to decompress. That’s where you get all that nasty junk, which is what they pulled off this guy. It’s just whatever is floating around that can’t get through, green, brown junk. They usually feel a ton better when that’s out.
A more severe case requires surgery to fix the the cause of the obstruction. Adhesions to the intestinal wall, whatever. Sometimes a bowel resection is required.
The literal shit is what’s left after digestion and absorption in the stomach and small intestine. That’s what your large intestine is for. You can have blockages there, but this is sounding more like a typical serious SBO.