Niddah, Chapter 6, Mishnah 1. As a rule, halachah does not confer the status of an adult, a gadol, on the basis of years alone. A boy or girl becomes an adult when the years have passed and the body has produced the recognized signs of physical maturity, the two hairs. Our mishnah addresses the case of a person in whom those signs never appear at all.
A background halachah
Before turning to the words of the mishnah, there is a halachah that the mishnah itself does not spell out but which must be kept in mind. If a person never develops the physical signs of maturity, that absence may itself point to something: in a man it can indicate that he is sterile, and in a woman that she is barren. Even so, if no such indication can be established, then once the person reaches the age of thirty five we treat him or her as a gadol in any case, notwithstanding the absence of any sign of sterility or barrenness. Our mishnah deals with the earlier possibility: where evidence of barrenness or sterility can be produced, adult status is granted already at the age our mishnah will specify, even though none of the usual physical indicators of adulthood are present.
The woman
Take the woman first. The mishnah speaks of a "bas esrim shanah", a girl who has completed her twentieth year, of whom it then says "shelo hevi'ah shtei se'aros", that her body never produced the two hairs. What is her remedy? "Tavi re'ayah", let her bring evidence: first that her age has genuinely reached twenty, and second "v'hi aylonis", that she is an aylonis, a woman whose body is incapable of childbearing. Once both points are established she is treated as a gedolah, a full adult. The mishnah immediately notes a limitation, however: "lo choletzes v'lo misyabemes". She does not undergo chalitzah, and she is not taken in yibum either, for a woman who can never give birth stands outside both of those halachos.
The man
Now the corresponding case of the male. The mishnah speaks of a "ben esrim shanah", a boy who has reached twenty, and adds "shelo hevi shtei se'aros", that the two hairs never came. He too "yavi re'ayah", brings evidence, demonstrating that his twenty years are genuinely complete and "v'hu saris", that he is a saris, a man who cannot father children. From that point on he carries the standing of a gadol in every area, with the one exception the mishnah records: "lo cholaitz v'lo meyabem". He neither performs chalitzah nor marries the widow of his childless brother.
The principle underlying both halves of the mishnah is the same. Ordinarily adulthood in halachah arrives together with the physical signs of maturity. A man who is sterile or a woman who is barren may never produce those signs, and yet halachah does not leave them as minors forever. Once barrenness or sterility can be demonstrated, adult status begins at twenty; and even where no such demonstration is possible, the status is granted at thirty five.
The dispute over the age
Everything taught until here represents a single view, and the mishnah says so: "eilu divrei Beis Hillel", these are the words of Beis Hillel. Beis Shammai rules otherwise. In their opinion a single earlier age governs both cases, "zeh v'zeh", this one and that one, the male and the female together, and that age is "b'nei shemoneh esreh", eighteen years rather than twenty.
Rabbi Eliezer offers what amounts to a blend of the two views: "hazachar k'divrei Beis Hillel", for a male the halachah follows Beis Hillel, twenty years, "v'hanekeivah k'divrei Beis Shammai", and for a female the halachah follows Beis Shammai, eighteen years. His reasoning is stated in the mishnah itself: "sheha'ishah memaheres lavo lifnei ha'ish", a woman reaches physical maturity earlier than a man does, and so the point at which her failure to develop becomes conclusive arrives sooner as well.