Dear Marcelle Rose
It all depends how old the baby is.
If the baby is very little when it dies then usually the mother's uterus contracts and the baby is pushed out. This is painful and sad for the mother but usually it is the best thing because something was probably wrong with the baby and it would not have been normal if it had survived.
Even if the baby is tiny it is important for the mother to be able to be sad and to say goodbye to the baby. I know one mother who held her little baby in the palm of her hand for a while and talked to it and said how much she loved it and how sorry she was that it died. She cried a lot. Then the little baby was buried.
Of course, if the baby is very tiny (still a fetus) the mother may not even know she had been pregnant. When the baby miscarried the mother might think it was just a late period.
If the baby dies when it is nearly time to be born then the mother requires careful medical treatment. Usually she gives birth to the baby in the normal way but sometimes a Caeserean section is preferred (where a doctor makes a cut in the abdomen and takes the baby out that way).
Then the mother and father (and sometimes sisters and brothers) need to say goodbye to the baby before it is buried or cremated.
Whatever happens, it is important that the mother receives expert medical care and lots of support from her family and friends.
Not so long ago, if a mother had a stillbirth it was something she might feel too sad or embarrassed or ashamed about to talk with many people. Some women even didn't tell their husbands (if it happened when the baby was very small and he didn't know she was pregnant).
These days people think it is very important to support the mother (and the father) and let them go through the grieving process. After all, it was their dear little child who died.
Whatever happens, if a baby dies before it is born it has to come out. Otherwise the mother will die, too.