Welcome. In Mishnah 4 we discuss the law of a paroches (curtain) that became tamei. The Gemara in Maseches Yoma teaches that there were thirteen paroches curtains (screens) in the Second Beis HaMikdash:
Seven at the seven gates of the Azarah.
One at the entrance to the Heichal.
One at the entrance to the Ulam.
Two in the Kodesh HaKodashim.
From the words of the Rambam it appears that our Mishnah deals with all of these curtains, while others understand that the Mishnah is speaking specifically about the curtain that stood before the Ulam.
A curtain that became tamei through a valad hatumah:
The Mishnah opens with a curtain "shenitmeis b'valad hatumah" - a valad hatumah is not an av hatumah, but rather a rishon l'tumah or a sheni l'tumah, a lower level of tumah. The halachah is that a utensil, including a curtain, does not become tamei by Torah law except from an av hatumah, such as a sheretz or a dead mouse, which are an av hatumah and render the curtain tamei mid'Oraisa. A valad hatumah, by contrast, sometimes renders utensils tamei only mid'rabbanan.
The example of this: liquids that touched a sheretz become a rishon l'tumah, and by rabbinic law tamei liquids render utensils tamei. This is the case the Mishnah is dealing with - a curtain that became tamei through a valad hatumah, such as a liquid that is a rishon l'tumah.
Generally speaking, it is forbidden to bring tamei utensils into the Azarah. However, when the tumah is only rabbinic and the curtain is inside the Azarah, the Mishnah says: "matbilin osah bifnim" - it may be immersed within the Azarah itself, and there is no need to take it outside the Azarah, since it became tamei only mid'rabbanan. "U'machnisin osah miyad" - there is no need to wait for nightfall, for the halachah is that whatever became tamei only by rabbinic law and not by Torah law does not require he'erev shemesh, and does not need the darkness of that night in order to become tahor.
A curtain that became tamei through an av hatumah:
By contrast, a curtain "shenitmeis b'av hatumah" - tumah by Torah law, such as if it touched a dead mouse or a neveilah, the carcass of a larger animal - "matbilin osah bachutz", outside the Azarah, for once it became tamei with a Torah-level tumah it had to be removed immediately. "V'shotchin osah bachayil" - it is spread out in the Cheil, the area outside the Azarah, until nightfall arrives, and only once it grows dark is it brought back inside.
And if it was new:
And if this was a new curtain - "shotchin osah al gabei ha'itztaba" - it is spread out on the itztaba, the balcony, in a way that it can be seen from a distance, so that the people should see the beauty of the curtain.
In summary: Our Mishnah distinguishes between a curtain that became tamei through a valad hatumah, whose tumah is rabbinic - and therefore it is immersed within the Azarah and brought back in immediately without he'erev shemesh - and a curtain that became tamei through an av hatumah, whose tumah is by Torah law - and therefore it is immersed outside the Azarah and spread out in the Cheil until nightfall. And if the curtain was new, it is spread out on the itztaba, so that the people should see its beauty.