When a woman gives birth to a child, she becomes ritually impure for seven days if that child was a male, and for fourteen, if it was a female. However, after this begins her period of purity, and even if she sees blood, this blood is pure. This period lasts for thirty-three days for a male child, and sixty-six for a female. This purity is only in regards to her relations with her husband; in order to go to the Temple, she needs to wait out the complete time above, and then bring a childbirth offering.
If she miscarries a formless mass, it is not considered birth at all. Consequently, she is only impure if together with the mass she expelled some blood; otherwise she is pure. Rabbi Yehudah declares her impure even in that case.
What is the reason of Rabbi Yehudah? Actually, they argue in a narrow case. If the expelled mass was one of the four colors discussed previously, all agree that she is impure. They only argue about the case where she misplaced the mass before it could be examined. Rabbi Yehudah says that since statistically the miscarriage has one of these colors in the majority of cases, we have to assume that hers was the same way. However, the Sages disagree about this statistics and say that it is not a proven fact.
Art: Theodore Robinson - Mother And Child By The Hearth