As soon as a woman begins to menstruate she is rendered a nidda, even if the blood has not yet exited her body. The first Mishna in Massekhet Nidda discusses when a woman who first sees menstrual blood is considered ritually impure so that things that she touches become ritually defiled. In the Mishna we find a disagreement between Shammai, Hillel and the Sages. The Mishna teaches
Shammai ruled: For all women it suffices to reckon their period of uncleanness from the time of their discovering the flow.
Hillel ruled: Their period of uncleanness is to be reckoned retrospectively from the previous examination to the last examination, even if the interval extended for many days.
The Sages, however, ruled: The law is neither in agreement with the opinion of the former nor in agreement with that of the latter, but the women are deemed to have been unclean during the preceding twenty-four hours when this lessens the period from the previous examination to the last examination, and during the period from the previous examination to the last examination when this lessens the period of twenty-four hours.
While Shammai assumes that menstrual blood will be seen immediately and we will have instantaneous knowledge regarding the woman’s ritual impurity, Hillel believes we cannot be certain when her status changes, so we can only look back at the last time she was certainly ritually pure, and anything she came into contact with after that time is deemed ritually defiled.
In explaining the opinion of the Sages, the Gemara clarifies that at the time that the laws of ritual purity were widely observed, it was established practice for women to examine themselves twice a day – in the morning and in the evening – in order to show that everything they had touched during the previous 12 hours had not been defiled. Thus, if a woman discovers in the evening that she is a nidda, anything she came into contact with since the morning is rendered impure. If she did not follow the practice of twice-daily examinations, the Sages penalized her and ruled that anything she touched over the previous 24 hours is considered impure.