http://www.nlm.nih.gov/medlineplus/ency/article/003118.htm
There are several reasons why someone may vomit blood. For example, vomiting that is very forceful or continues for a very long time may cause a tear in the small blood vessels of the throat or the esophagus, producing streaks of blood in the vomit.
Other causes may include:
Bleeding ulcer located in the stomach, duodenum, or esophagus
Bleeding esophageal varices
Defects in the blood vessels of the GI tract
Esophagitis
Gastritis
Gastroenteritis
Irritation or erosion of the lining of the esophagus or stomach
Swallowing blood (for example, swallowed after a nosebleed)
Tumors of the stomach or esophagus
Other causes may include:
Bleeding ulcer located in the stomach, duodenum, or esophagus
Bleeding esophageal varices
Defects in the blood vessels of the GI tract
Esophagitis
Gastritis
Gastroenteritis
Irritation or erosion of the lining of the esophagus or stomach
Swallowing blood (for example, swallowed after a nosebleed)
Tumors of the stomach or esophagus