Erythroblastosis fetalis, AKA Haemolytic disease of the newborn, occurs when the mother's immune system starts attacking her own fetus's blood. This is rare, and is becoming more rare as modern medicine progresses. However it can be deadly to the fetus, and failing that it can lead to permanent brain damage and other disorders. Erythroblastosis fetalis can result from two separate causes:
Rh incompatibility disease: Red blood cells have various antigens (identifying proteins) on their surface. One of the most telling of these proteins is the rh antigen. Blood can be divided into two groups, rh positive (rh+), and rh negative (rh-). It is not a bad thing to have either of these blood types, but if the mother has rh- blood and the baby has rh+ blood (inherited from the father), the mother's immune system may start producing antibodies that will attack the baby's blood cells.
It is worth noting here that if the mother is rh+ and the fetus rh-, there will be no problem, as the rh- blood doesn't have an antigen that the rh+ blood does not, and there is nothing for the mother's immune system to react too.
When the antibodies attack the red blood cells, they cause anemia and kernicterus, which can lead excess bilirubin collecting in the brain, leading to deafness, speech problems, cerebral palsy, and other forms of brain damage. It often also leads to heart failure and death. It is common for untreated rh incompatibility disease to cause miscarriages and stillbirths, although in the developed world there are few cases that are left untreated.
ABO incompatibility disease: Just as there are differing rh factors, there are other antigens that appear on the surface of blood cells. The most famous of these you've heard of as blood types: A, B, O, and AB. Type O blood doesn't have antigens, while the others do. Thus if the mother has type O blood, and the fetus has type A or B blood inherited from the father, the mother's body may make antibodies to attack the baby's blood.
While ABO incompatibility disease works in essentially the same way as rh incompatibility disease, ABO disease is much milder in its effects, and much less damaging to the baby. Other than jaundice and postpartum anemia, the baby is usually fine. Thus, when talking about erythroblastosis fetalis, people are usually referring to only rh incompatibility unless otherwise stated.
Usually the placenta is a sufficient barrier to keep the baby's and the mother's blood from mixing. But while blood does not usually pass the placental barrier, antibodies may. If the blood never mixes, the mother will never form the antibodies to attack the rh+ blood. But the mother may be exposed to rh+ blood through a blood transfusion, from trauma to the womb, or there may simply be minor 'leakage' across the placenta. There may also be contact with the baby's blood during birth; if this happens then her next rh+ baby may have problems.
It is common practice to give pregnant mothers a blood test, and if they are type O, and especially if they are rh-, the father should get a blood test too. If the father is rh+, or if the father is unknown, the mother is tested for antibodies against the rh factor. If the baby is at risk the mother may be given drugs to block the production of the antibodies, or undergo plasma exchange to remove the harmful antibodies. The baby may be given blood transfusions. When the fetus is viable, labor may be induced.
These measures, along with the fact that most of the population is rh+, and thus never faces this problem, keep deaths from erythroblastosis fetalis from being a big problem in the developed world. But it is still very important that you go to see a doctor when you are pregnant, and get all of the suggested tests done. It is also important to realize that the second and later pregnancies are likely to have much greater complications than the first pregnancy, because once the antibodies are present in the blood they do not leave, and the mother's body is ready to attack the fetuses blood right from the start, even if symptoms were never evident during the first pregnancy.
You may be wondering, what is this 'erythroblastosis'? What does "the abnormal presence of erythroblasts in the blood" have to do with the conditions I've just described? The connection is a little vague. When the fetus starts losing red blood cells, its body reacts by producing more erythroblasts, in an attempt to make more red blood cells. Reticulocytosis also results, as more immature blood cells (reticulocytes) are produced. The diagnosis of erythroblastosis is used as a benchmark of sorts to determine how serious the disease is; a high level of erythroblasts indicate that the disease is becoming severe enough to be an important threat.