There are two periods in the woman's cycle, the seven days of niddah, and the following eleven days of zivah. The characteristics of these cycles are summarized for reference here. If a woman finds a blood stain on her clothing, and she does not know when it happened, then her count is messed up.
Since she is unaware on which day the blood was discharged from her uterus, she does not know when her seven-day niddah period begins, and consequently, cannot know when her eleven-day zivah period will start. She would have to wait out seven days after she finds a stain, and then begin her eleven-day count, but if more discharges happen during this time, there are multiple possible counting scenarios, and it is not known which one is true. Therefore, she will have to wait for enough pure days to be out of all doubts.
The idea of a stain impurity was established by the Sages. From the Torah, the woman is only ritually impure as a niddah and forbidden to her husband if she felt the sensation. Thus, if she finds a stain and does not know when it happened, obviously she did not feel it, and thus the Torah would not consider her a niddah. The Sages, who established this law, also limited it to stains larger than a lentil, because smaller sizes can be attributed to other sources.
Art: Jan Miense Molenaer - A couple making music in an interior