Hematoemesis is a medical term, which means vomiting
blood. "Hema" means
blood, and "emesis" means
vomit. Hematoemesis is a symptom of when a person either throws up blood, or blood is found in the vomit.
If you are throwing up blood, it could be a sign of some sort of bleeding stomach ulcer or in the duodenum or from a tear in your esophagus (which could be caused from prolonged vomiting, giving you streaks of blood). It's usually from part of the upper Gastrointestinal (GI) tract. That can include tumors, or gastritis (an inflamed stomach). If you don't vomit the blood, you could also spot it as blood in the stool.
There's not much you by yourself can do to treat it. You would have to see a doctor, as soon as possible, probably at an Emergency Room. They would ask you how long it had been going on, and possibly take a sample if you vomit again. The color of the blood you throw up can tell a lot, whether it's bright red, dark red, or black, or clotted. Nosebleeds, coughing, or vomiting could aggravate it.
Depending on your symptoms, the doctor could do an endoscopy down your throat, or a nasogastric tube down your nose, to check your stomach. The hospital might also do some blood tests to check your clotting factors and other factors.
In the long term, a doctor may prescribe medications to decrease stomach acid. If it gets worse, and the bleeding doesn't stop, there's a chance you could need surgery.
Note: Don't trust me, I'm not a doctor, I just have EMT training.