Yevamot, Chapter Eleven, Mishnah Three
This mishnah and the following two mishnayoth deal with a favorite rabbinic topic, especially in seder Nashim: people getting mixed up and not knowing who they are. We will see similar discussions in tractates Gittin and Kiddushin.
In the case in our mishnah, five boys from five women got mixed up, and nobody knows for sure who belongs to which mother. The problem is that should they die without children and they have brothers (or at least each woman has one other son who she knows is her son), they dont know who is whose brother. This mishnah teaches an elegant, yet intricate way of solving the problem of who gets halitzah and yibbum from whom.
In my opinion these are rabbinic mindbenders that some times teach principles but do not reflect reality.
If the children of five women were mixed up and, when these mixed up children grew up, they took wives and then died, four perform halitzah for one [of the widows] and one contracts with her yibbum.
[Then] he and three [brothers] perform halitzah to [another one of the widows] and one has with her yibbum.
Thus every one [of the widows] has halitzah four times and yibbum once.
After the five children were mixed up, they no longer know who their mother is, nor which of the womens other sons are their brothers. When they grow up and take wives and then all die without children, it is unclear which brother of the dead, mixed up brothers should perform halitzah or yibbum for which widow. The mishnah states that first four brothers should perform halitzah for one widow, and then the fifth brother may have yibbum with her. If he was really her husbands brother then the yibbum is done by the person who should do it. If one of the other brothers was really her husbands brother, then she has already had halitzah and is free to marry someone else.
Then the brother who has had yibbum with one widow, joins three other brothers and repeats the process with the second wife. She too has yibbum with the fifth brother. So on and so on they all repeat this process until each woman has halitzah four times and yibbum once.
Note that there are other potential solutions to this problem. Four brothers could give halitzah to each woman and the fifth brother could have yibbum with each wife. Alternatively, all five brothers could have halitzah with all five wives. The mishnah probably chose this means of solving the problem so that all five wives would have one husband and no husband would perform yibbum more than once. Although bigamy was permitted in the time of the mishnah, it seems that monogamy was much more common and probably preferred.