I'm rh negative and my doc said that there are antigens on red blood cells, true for moms and babies and everyone. But my blood type is o- abd my husband's is b+. So the mixing of genes in the baby can make it so my body's immune system thinks the antigens on baby's blood cells are dangerous because the baby might have positive blood. Only we can't test that really til the baby arrives. The shot makes it so that your body doesn't try to attack the baby's cells. Typically the first baby is fine but my doc is giving me the shots anyway just to be safe. As long as you have the injections every 12 weeks then there is nothing to worry about.
It's basically a shot you get to keep you from being allergic to your baby. Neg blood types can only give blood to neg blood types. If your baby is a pos blood type then your own body would see your baby as a foreign body and try to attack it making both of you sick and causing you to possibly miscarry. The shot keeps that from happening.
Best way I know to explain it.