A miscarriage is the natural death of an embryo or fetus in the womb, before it is old enough to live on its own, outside the mother.  The medical words for a miscarriage are spontaneous abortion.  ("Spontaneous" means something that a person did not expect to happen.  An "abortion" is when a pregnancy ends early, before birth.)

Among women who know they are pregnant, about 15-20% have miscarriages.  (This means that up to 1 in every 5 women who know they are pregnant miscarries.) It is the most common complication (serious problem) that happens in early pregnancy in humans.

Miscarriage vs. Stillbirth
In the United States, if a fetus dies after it is 20 weeks old, its death is no longer called a miscarriage.  Its death is called a stillbirth, a fetal demise, or a fetal death.  ("Demise" means "death.") Different countries have different ways of defining the difference between a miscarriage and a fetal death.  For example:

Causes of miscarriage
Nobody knows all of the reasons why a woman may miscarry.  However, some common causes include:
 Genetic problems, like aneuploidy
 Problems with the mother's uterus or hormones
 An infection somewhere in the mother's reproductive system
 Tissue rejection (where the mother's body reacts to the fetus like it is something that does not belong in her body)
 Serious physical trauma (injury, like a bad car accident
 Very rarely, medical procedures that are used to diagnose problems with the fetus can cause miscarriage.  This happens in only about 1% of cases (1 out of 100) when a woman has had chorionic villus sampling (CVS) or amniocentesis)

The most common causes of miscarriage change depending on what trimester the mother is in.  (Each trimester lasts about three months.)

First trimester (Weeks 1-12)

Most miscarriages happen during the first trimester.  Some studies say that two-thirds (two out of three) to three-quarters (three out of four) of all miscarriages happen during this trimester. About 30% to 40% (3 to 4 in every 10) of all fertilized eggs miscarry, often before a woman knows she is pregnant.

In more than half of embryos miscarried in the first 13 weeks of pregnancy, the embryo has chromosomes that are not normal. These chromosomal problems may happen because of problems as the embryo grows and its cells make copies of themselves.  It is also possible for chromosomal problems to happen because of a problem with a parent's genes.  However, this is more likely to happen in women who have had other miscarriages, or if one of the parents has a child or other relatives with birth defects. Genetic problems are more likely to happen with older parents; this may be why miscarriages are more common in older women.

Another cause may be the mother not having enough progesterone.  If a woman is diagnosed with low progesterone levels in the second half of her menstrual cycle (the luteal phase), she may be prescribed progesterone, to take during the first trimester of her pregnancy.  However, when a woman might already be miscarrying, there is no evidence that first-trimester progesterone pills decrease the risk of having a miscarriage.  Scientists have even questioned whether problems with the luteal phase really can cause miscarriages.

Second trimester (Weeks 13-27)
Common causes of miscarriage during the second trimester are:
 Uterine malformation (when the mother's uterus is not shaped normally)
 Growths in the mother's uterus (these are called fibroids)
 Problems with the mother's cervix

These problems can also cause premature birth (when a baby is born earlier than expected). One study found that 19% of second-trimester miscarriages were caused by problems with the umbilical cord.  The fetus gets blood and oxygen through the umbilical cord.  Every part of the body needs blood and oxygen to survive.  If the baby cannot get enough oxygen because of a problem with the cord, it can die. Problems with the placenta may also cause second-trimester miscarriages.  Nutrients and blood pass through the placenta in order to get from the mother to the umbilical cord.  The placenta also helps filter out some things that could hurt the fetus.  If there is a problem with the placenta, the fetus could die because it did not get enough nutrients and oxygen, or because the placenta did not filter out harmful things.

How is miscarriage diagnosed?
Miscarriage is usually diagnosed when a pregnant woman notices that she is having certain symptoms and goes to see a doctor.  The most common symptom of a coming miscarriage is bleeding during early pregnancy.  The woman may not have any pain.

Usually, if a pregnant woman is bleeding or having pain, an ultrasound should be done.  The ultrasound can show that the fetus's heart is not beating, which means that the fetus has miscarried.  If this happens, special tests should be done to make sure the woman does not have an ectopic pregnancy, which can kill a woman.

Not all light bleeding during early pregnancy means a woman is having a miscarriage.  But any woman having light bleeding during pregnancy should see her doctor.  If the bleeding is heavy, the woman is having a lot of pain, or she has a fever, she should go to an Emergency Room or call an ambulance to take her to the hospital.

If a woman has bleeding during her pregnancy, she may be diagnosed with a "threatened miscarriage."  In the past, if a doctor thought a pregnancy might miscarry in the future, they would suggest bed rest for the mother (lying in bed for most of the time).  Today, most doctors and scientists think that bed rest does not help.

How is miscarriage treated?
There are a few different types of miscarriage:
 In a complete miscarriage, the fetus has totally left the mother's body.  So has the placenta.  There are no pieces of fetal or placental tissue left in the uterus.
 In a missed miscarriage, the fetus has miscarried but is still inside the mother's body.  This often happens when the mother does not realize she had a miscarriage (which is common when the pregnancy is very early on).
 In an incomplete miscarriage, parts of the fetus or the placenta are still in the uterus.

The treatment is different for each kind of miscarriage.

Complete miscarriage
If a woman has a complete miscarriage, she usually does not need any medical treatment.

Incomplete or missed miscarriage
If a woman has an incomplete miscarriage or a missed miscarriage, there are three different choices for treatment:
Watchful Waiting means that a doctor will keep checking on the woman, but will not give any treatment unless a problem happens.  With watchful waiting, most of these miscarriages will pass naturally in two to six weeks.  This means that the tissue left in the woman will leave her body, through the vagina, without any treatment.
With no treatment (watchful waiting), most of these cases (65–80%) will pass naturally within two to six weeks.  This path avoids the side effects and complications possible from medications and surgery, but increases the risk of mild bleeding, need for unplanned surgical treatment, and incomplete miscarriage.
Medical Management means that medicine is given.  Usually, a medicine called misoprostol is given.  Misoprostol makes the uterus contract (get tighter) to push out whatever is inside.  In about 95% of cases (95 out of 100), the fetal or placental tissue that is left in the uterus will leave the woman's body within a few days.
Surgery is the fastest way to complete a miscarriage.  It also makes bleeding less heavy and makes it not last as long.  Also, the woman will not have to go through the physical pain of the miscarriage.  Most often, one of two surgeries are used to complete the miscarriage: 
Vacuum aspiration, sometimes called dilation and evacuation (D&E).   In a D&E, a tube attached to a pump sucks the tissue left in the uterus out through the cervix.
Dilation and curettage (D&C).  In a D&C, the cervix is widened, and the tissue left in the uterus is scraped and scooped out ("curettage").  Compared to giving medications, D&C has a higher risk of causing problems.  For example, the cervix or uterus may be injured.  Because of this, some women prefer not to have a D&C because they want to have children in the future and want to lower the chances of problems during future pregnancies.  However, if a woman has had more than one miscarriage, D&C is the most convenient way to get tissue samples, which can be studied to see if a reason for the miscarriages can be found.

Which treatment should be used?
The choice of which treatment to use depends on many things, including what the mother wants.  However, there are guidelines that doctors use to suggest what treatment to use.

Missed Miscarriage

The most important things that help doctors decide what to do are the age and size of the embryo, and the size of the gestational sac (the fluid around the embryo.  
 For embryos that were less than 7 weeks old, and the smallest gestational sacs, watchful waiting is the best choice, because the embryo will often leave the mother's body naturally.
 For embryos that were 7–9 weeks old with larger sizes and gestational sacs, medicine is suggested, but either watchful waiting or surgery might be used depending on the situation.  
 For the embryos that were over 9 weeks old, with the largest gestational sacs, surgery is suggested because the mother is likely to have a lot of pain and bleeding when she miscarries.

Incomplete Miscarriages

 For an incomplete miscarriage, the size of the tissue left in the uterus is the most important thing that helps doctors decide what to do.  Ultrasound is used to find out how large the tissue is. 
 If the tissue left is smaller than 15mm (millimeters): Watchful waiting is usually the best choice because it is likely that the tissue will leave the mother's body on its own.
 If the tissue is between 15 and 20mm: Medical or expectant management is suggested.  Surgery is chosen only if there is a specific reason why the mother needs it.
 If the tissue is over 35 to 50mm, these things are suggested:
 Giving misoprostol to make the tissue left in the uterus leave the mother's body on its own more quickly.
 Having the mother stay in the hospital to be watched for a few hours or overnight.  She should stay until most of the tissue left in her uterus has passed, and she has stopped bleeding.
 If misoprostol has not worked, surgery may be needed.

Risk factors
A risk factor for miscarriage is something that makes a woman more likely to miscarry.  There are many risk factors for miscarriage.  For example:
 The age of the mother.  Women older than age 35 have a higher risk of miscarriage than younger women. At age 35, a woman has about a 20 percent risk. At age 40, the risk is about 40 percent. And at age 45, it's about 80 percent.
 Multiple pregnancies (pregnancies with more than one fetus, like twins and triplets).  The more fetuses in the womb, the higher the risk.
 If the mother has certain diseases, like:
 Diabetes, especially the mother needs insulin and her diabetes is still not controlled well.
 Hypothyroidism, especially when the hypothyroidism is very bad.
 Some infections, like HIV, rubella, malaria, and some sexually transmitted diseases like chlamydia, gonorrhea, and syphilis.
 If the mother or father smokes tobacco (cigarettes). 
 If the mother drinks alcohol while she is pregnant, especially if she drinks often, or drinks a lot at once.  The United Kingdom's National Health Service says that drinking alcohol becomes a risk factor if a mother drinks more than one glass of wine, more than one shot of whiskey, or more than two-thirds of a pint of beer a week.  Most doctors say that no amount of alcohol during pregnancy is safe.
 If the mother uses illegal drugs, like cocaine, while she is pregnant.  
 If the mother is injured, exposed to certain poisons, or is using an IUD when she gets pregnant.
 Problems with the mother's uterus or cervix.
 Some types of food poisoning.

Further reading 
 Congenital disabilities that can cause miscarriage
 Ultrasound (used to diagnose miscarriage)
 Dilation and curettage
 Dilation and evacuation
 Stillbirth

References 

Abortion