Niddah, Chapter 5, Mishnah 4. This mishnah lists the many halachos that already take effect for a child from the very first day of life, beginning with tumah and moving on to yibum, terumah, inheritance, murder and aveilus.
A newborn girl and niddah. The mishnah opens with "Tinokes bas yom echad" (an infant girl of a single day), and rules of her: "mitam'ah beniddah." Should blood issue from her womb, she takes on the tumah of a niddah. Young as she is, one day into her life, that tumah already applies to her.
A girl of ten days and zivah. "Bas asarah yamim mitam'ah bezivah": a girl who is ten days old can already become temei'ah on account of zivah. Count it out from the very beginning of her life: there are the seven days of niddah, and then on days eight, nine and ten, if she sees blood on three consecutive days, she is a zavah gedolah. That means that already at the age of ten days a girl can be temei'ah as a zavah.
A newborn boy. Of a male the mishnah says "Tinok ben yom echad" (an infant boy of a single day), and of him it rules "mitamei bezivah": from his first day he is already subject to the tumah of zivah. "Umitamei benega'im": his own body is capable of contracting the tumah of tzara'as. "Umitamei betumei meis": he is likewise susceptible to the tumah conveyed by a corpse.
He creates an obligation of yibum. "Vezokeik leyibum": should his brother pass away, this infant of a single day brings about the bond of yibum. Naturally, a newborn is in no condition to wed his brother's widow at present, yet she becomes tied to him, so that once he reaches bar mitzvah he will be required either to marry her or to give her chalitzah. This bond attaches to her even though the surviving brother has been in the world for only a day.
And he exempts from yibum. "Ufoter min hayibum": he also exempts his mother from yibum with his uncle. Picture a case where his father dies, and the question arises whether his mother must now do yibum with her brother-in-law. The halacha is that a man who dies without children leaves his wife bound to his brother for yibum. But even a one-day-old baby counts as a child, and his existence exempts his mother and his uncle from yibum altogether.
He enables his mother to eat terumah. "Uma'achil biterumah": through him another person is permitted to eat terumah. The case is a bas Yisrael married to a kohen, whose husband died leaving her pregnant. When the baby is born, she now has, from that first day, a son who is himself a kohen, and on that account the right to eat terumah stays with her, since she is still bound to a household of kehunah.
Inheritance. "Venoichel umanchil": he inherits and he causes others to inherit. If, for example, he has already inherited property and then he dies, that inheritance passes on to his own heirs.
Murder. "Vehahorgo chayav": one who kills him is liable to the death penalty, even if the child is only one day old.
Aveilus. "Vaharei hu le'aviv ule'imo" and, the mishnah continues, "ulechol kerovav": in relation to his father, his mother, and every one of his relatives, he is regarded "kechasan shaleim," like a full-fledged groom. The Gemara clarifies that the point concerns the laws of aveilus: they observe complete mourning over him, precisely as they would over a child who had reached adulthood.