The mishnah before us deals with two topics: the law of an onen on Erev Pesach, and the law of a convert who converts on Erev Pesach.
The law of an onen:
An onen is someone who has lost a close relative. On the day of the death he is an onen by Torah law, and he may not eat sacred foods. On the night following the death, even if the deceased has not yet been buried, his aninus is only rabbinic, and the prohibition against eating sacred foods during that time is likewise only rabbinic.
The mishnah states: "Onen tovel ve'ochel es pischo la'erev" - on the day that he is an onen he immerses in a mikvah, and that night he eats the korban Pesach. Although an onen normally does not eat sacred foods, the Sages did not extend that prohibition to the korban Pesach in a case of rabbinic aninus, since failing to eat the offering involves the penalty of kares, and therefore they permitted him to eat it.
"Aval lo bakodashim" - with the other offerings he may not do so. Since they do not carry a penalty of kares, and on the night following the death the person is considered an onen by rabbinic law, he is forbidden by rabbinic law to eat sacred foods.
One who hears of a death and one who gathers bones:
One who hears of a death: someone who heard that a close relative passed away some time earlier, and he must now sit shivah. He is considered an onen for one day only, and even that aninus is only rabbinic, since the deceased died some time before.
One who gathers bones: someone whose parents were buried in a temporary grave, and now their bones are being removed to be buried in a permanent grave. Here too a rabbinic aninus applies for that day.
In both of these cases the mishnah rules: "Tovel ve'ochel bakodashim" - he immerses in a mikvah, and on the following night he may eat sacred foods. Since even during the day his aninus is only rabbinic, the Sages did not extend the prohibition against eating sacred foods to the night that follows, which is merely an extension of a rabbinic aninus.
A convert who converts on Erev Pesach:
The mishnah continues: "Ger shenisgayer be'erev Pesach" - one who converts on Erev Pesach, which means that he was also circumcised on that day. Beis Shammai and Beis Hillel disagree about his law:
Beis Shammai say: "Tovel ve'ochel es pischo la'erev" - he immerses in a mikvah and eats the korban Pesach that night, and there is no problem with this. All that is required of him is an additional immersion for the sake of eating sacred foods, even though he already immersed for the sake of conversion.
Beis Hillel say: "Haporesh min ha'orlah keporesh min hakever" - one who has just been circumcised is treated like one who has separated from a grave, and he must wait seven days before he can eat sacred foods, and therefore he does not eat the korban Pesach.
The scope of the dispute:
The Gemara explains that the dispute does not concern an uncircumcised Jew: a Jew who for some reason was not circumcised - for example, one whose brothers died as a result of circumcision so that his own circumcision was postponed, or in our times someone who immigrated from the former Soviet Union. Such a person, even according to Beis Hillel, eats the korban Pesach immediately, and there is no problem with this.
It should be emphasized: an uncircumcised person may not eat the korban Pesach by Torah law, and he must first be circumcised - this is a Torah law about which there is no question. But the statement of Beis Hillel, that after circumcision he must wait as though he were tamei from contact with a corpse, does not apply to a Jew who is circumcised.
What, then, is the dispute about? About someone who converted on that very day, as the mishnah says: "Ger shenisgayer be'erev Pesach".
The reason for the decree:
This is a rabbinic law. Beis Hillel were concerned that the convert may have come into contact with a corpse a few days earlier. Strictly speaking there is no problem, since a gentile does not become tamei through contact with a corpse; and now that he has become a Jew, even though the laws of tumah apply to him, he is no longer in contact with the corpse.
The Sages, however, were concerned that the convert would not grasp this distinction. The following year, when he has been a Jew for close to a year, he will come into contact with a corpse and say to himself: "Last year I came into contact with a corpse right before my conversion, and I still ate the korban Pesach, so I can eat it this year as well" - without understanding that last year it was permitted to him because at the time of the contact he was not yet a Jew, whereas this year he was already a Jew, and therefore there is a problem.
For this reason the Sages ruled that every convert must wait seven days, lest he came into contact with a corpse, and lest he fail to notice that in the following year he will face a real problem if he comes into contact with a corpse before Pesach.