One who sets aside a female, or a male in its second year, for the korban Pesach:
The Mishnah discusses someone who set aside an animal for the korban Pesach, and the animal turned out to be unfit for that purpose. The korban Pesach must be a male within its first year, and therefore the two cases before us are invalid:
One who sets aside a female: he set aside a female lamb, whereas the korban Pesach comes only from males.
One who sets aside a male in its second year: he set aside a male lamb that has already entered its second year, whereas the korban Pesach must be within its first year.
What is the law regarding these animals? "Tir'eh ad sheyipol bah mum" - the animal is sent out to graze until it develops a blemish; then it is sold, and with the proceeds the owner brings a voluntary offering, which generally means an olah. It is worth noting that some have a different version of our Mishnah, according to which he brings shelamim with the proceeds - and this version is readily understood, since leftover Pesach money is by default brought as shelamim and not as an olah.
One who set aside his Pesach and died:
The Mishnah continues: if a person set aside his Pesach and died, and no one else was registered with him on that offering, the Pesach is left without owners. His son, who inherits it, cannot offer it as a Pesach, since he was not registered on it together with his father; rather, he brings it as shelamim. Its status is that of "motar Pesach" - both money left over from the Pesach and the Pesach animal itself that is left over are converted into shelamim.
However, if the son was registered on the korban Pesach together with his father, the animal can be offered as a korban Pesach. When is this so? The Gemara explains that it depends on the time of the father's death:
The father died on the fourteenth after midday: the time for bringing the korban Pesach has already arrived, so the obligation of the Pesach took effect upon the son before he became an onen. And since that night he is no longer an onen - as was explained, after nightfall the Torah level aninus lapses and he is permitted to eat the korban Pesach - he may offer the animal as a Pesach.
The father died before midday: the son became an onen before the obligation of the korban Pesach took effect upon him, and therefore he is deferred to Pesach Sheni, and he brings that very animal as his korban for Pesach Sheni.