Mishnahs four and five deal with two separate topics: the first - sacrifices and offerings brought by non-Jews; and the second - the scope of the liabilities for nosar and tamei in those items that do not have a matir (an enabling factor), which Mishnah three discussed.
Sacrifices of non-Jews:
The rule is that the Temple accepts a sacrifice brought by a non-Jew, provided that it is an olah (burnt offering) to be burned on the altar. A non-Jew cannot bring shelamim (peace offerings) or the like, but he may bring an olah. Regarding this, the Mishnah states: "Kadshei goyim ein chayavin aleihen mishum pigul, nosar vetamei" - one is not liable for the sacrifices of non-Jews on account of pigul, nosar, and tamei. These three restrictions do not apply to them.
Nosar - a sacrifice that is left over beyond its allotted time. For an olah, this means that not all the limbs were burned by the end of the day on which the sacrifice was brought.
Tamei - the prohibition against eating a sacrifice when the person is tamei (impure) or when the sacrifice is tamei. For an olah, there is no eating at all, but this applies if someone ate from it in a state of tumah.
With standard sacrifices of Jews, pigul, nosar, and tamei all carry the penalty of kares (spiritual excision); but for sacrifices of non-Jews, they do not apply at all, according to this Tanna.
Likewise, someone who slaughters or offers up a sacrifice for a non-Jew outside the Temple courtyard does not violate a negative prohibition. Usually, the law is that it is not permitted to bring sacrifices outside the courtyard, and slaughtering or offering them outside is forbidden, but according to this Tanna, this negative prohibition does not apply to the sacrifices of non-Jews.
The Mishnah attributes this view to Rabbi Meir, but the Gemara establishes that it is actually Rabbi Shimon, and this is also implied from other places. Two Tannaim argue about this:
Rabbi Shimon: These laws simply do not apply to the sacrifices of non-Jews.
Rabbi Yosi: There is no difference between sacrifices brought by a Jew and those brought by a non-Jew. Therefore, there is liability for kares for pigul, nosar, and tamei even with sacrifices of non-Jews, and there is also a negative prohibition against slaughtering a sacrifice for a non-Jew outside the Temple precincts.
The practical halachah essentially follows the opinion of Rabbi Yosi.
Nosar and tamei in items that do not have a matir:
Here, another point is introduced, returning to Mishnah three. There we learned that the law of pigul does not apply to items that do not have a matir or that are themselves the matir - the blood, the incense, the minchah offering, the kohen, and the like. The question is, what is their law regarding nosar and tamei?
The Mishnah states that the status of pigul does not take effect on them, and therefore eating them does not carry the penalty of kares for this reason, since they do not have a matir or they are themselves the matir. However, the other two liabilities among the three that carry kares still apply to them:
"Nosar" - If one leaves over the minchah or the frankincense beyond their permitted time and eats them, he is liable to kares.
"Tamei" - If one eats them while he is tamei, or when they are tamei, he is liable to kares.
"Chutz min hadam" - The only exception in the list in Mishnah 3 is the blood itself, which, based on the verses, is exempt from pigul, nosar, and tamei.
Rabbi Shimon limits this liability and states: "Bedavar shedarkan leechol" - meaning, only for things that are fit for consumption. In contrast, there are items on the list that are not food at all:
Wood - The Mishnah did not list it in Mishnah 3, but one can bring wood to burn as an offering, and wood is not fit for consumption.
Frankincense - This is designated for burning and cannot be eaten.
Incense - This is burned on the Altar and is also not food.
Therefore, according to Rabbi Shimon, one who eats from the wood, from the frankincense, or from the incense - there is no liability for them due to tumah. Even if he is tamei, he is not liable for eating them, because these are not food and are excluded from the law. The Tanna Kamma, on the other hand, holds that he is liable, and theoretically, one who eats incense in a state of tumah incurs kares.
Regarding the halachah, the Rishonim disagree:
The Rambam: For an item that is not fit for consumption - there is no liability of kares for eating it in a state of tumah.
The Raavad: He disagrees and holds that one is liable even for this.
In summary: In these mishnayos we learned that a gentile's offering is accepted in the Beis Hamikdash only as an olah, and the Tanna'im disagree whether the laws of pigul, nosar, and tamei, and the prohibitions of slaughtering and offering outside the Beis Hamikdash apply to it - and as for the halachah, we rule primarily like Rabbi Yosi, that there is no difference between a Jew's offering and a gentile's offering. We also noted that items which have no matir, even though they are not subject to pigul, are subject to liability for nosar and tamei, except for the blood; and we noted the opinion of Rabbi Shimon who limits this liability only to things that are normally eaten, and the dispute between the Rambam and the Raavad regarding this halachah.