There are four major blood types: A, B, O, and AB. The types are based on substances on the surface of the blood cells. Another blood type is called Rh. Rh factor is a protein on red blood cells. Most people are Rh-positive; they have Rh factor. Rh-negative people don't have it. Rh factor is inherited though genes.
When you're pregnant, blood from your baby can cross into your bloodstream, especially during delivery. If you're Rh-negative and your baby is Rh-positive, your body will react to the baby's blood as a foreign substance. It will create antibodies (proteins) against the baby's blood. These antibodies usually don't cause problems during a first pregnancy.
But Rh incompatibility may cause problems in later pregnancies, if the baby is Rh-positive. This is because the antibodies stay in your body once they have formed. The antibodies can cross the placenta and attack the baby's red blood cells. The baby could get Rh disease, a serious condition that can cause a serious type of anemia.
Blood tests can tell whether you have Rh factor and whether your body has made antibodies. Injections of a medicine called Rh immune globulin can keep your body from making Rh antibodies. It helps prevent the problems of Rh incompatibility. If treatment is needed for the baby, it can include supplements to help the body to make red blood cells and blood transfusions.
NIH: National Heart, Lung, and Blood Institute