Shabbos, Perek Kol Kisvei, Mishnah 1. As background for understanding the Mishnah, we must first cite the words of the Gemara: when a fire breaks out on Shabbos, the Sages were concerned that a person is in a state of panic and confusion, and out of worry for his property he is liable to extinguish the fire - something forbidden on Shabbos except where life is at stake, whereas for monetary loss one does not extinguish. Therefore the Sages limited which items and how many items may be rescued from a fire, a limitation that brings a person to a calmer state of mind and prevents him from putting out the fire.
The words of the Mishnah:
"Kol kisvei hakodesh matzilin osan mipnei hadeleikah" - all sacred writings, Torah, Neviim and Kesuvim written in the holy tongue, may be rescued from the fire and taken out of the house.
"Bein shekorin bahen u'vein she'ein korin bahen" - whether they are sacred writings that are read publicly on Shabbos, such as the Chumash and the Neviim for the reading of the Haftarah, or those that it is not customary to read, such as Kesuvim, which even an individual was not supposed to read on Shabbos, as will be explained.
"V'af al pi shekesuvim b'chol lashon" - as a matter of halachah we follow the view of Rabban Gamliel, that sacred writings should not be written in other languages, and therefore they are not rescued from a fire and are not included among the sacred writings that are rescued on Shabbos. Nevertheless they require genizah, since they are not considered devoid of sanctity, and therefore they must be buried and not discarded.
The Mishnah asks: "Mipnei mah ein korin bahen?" - why does one not read Kesuvim on Shabbos? And it answers: "Mipnei bittul beis hamidrash" - so that people should not refrain from coming to the beis midrash to hear the derashah. In those days they would expound on Shabbos on practical halachos that the public needed, whereas Kesuvim were among the things that draw a person's heart and occupy him, so that he would be drawn after them and refrain from hearing the derashah.
"Matzilin tik hasefer im hasefer":
One does not rescue only the scroll itself; its cover or the case in which it rests may also be taken along with it at the time of the rescue. So too the tefillin case is taken along with the tefillin, since tefillin are also included among the sacred writings. And even if there were coins in the case, which have the status of muktzeh - since they are taken along incidentally with the tefillin, they may be taken out and rescued from the fire.
To where does one rescue?
The items may not be carried into a public domain, for there is no permission to desecrate Shabbos; all that the Sages limited was the quantity of the rescue, in order to remind a person not to extinguish the fire. But it still needs to be clarified where one may take them out to, and the Mishnah says: to a mavoi (alleyway). Such was the layout of a settlement in the times of Chazal - houses opening into a courtyard, and several courtyards opening into a mavoi, a sort of large alley, and the mavoi leads out to the public domain.
"Mavoi she'eino mefulash":
In the laws of eruvin, a mavoi she'eino mefulash is an alleyway closed on three sides and open on the fourth, as opposed to a mavoi mefulash, which is open on two sides so that the public passes through it. In our Mishnah, however, the Gemara explains that the reference is to an alleyway that has three sides, and on the fourth side it also has a lechi or a korah - the correction required in order to permit carrying within it.
The only deficiency in such an alleyway is that a shituf mevo'os was not made in it. In order to carry within a courtyard one must make an eruvei chatzeiros, whereby all the residents of the houses in the courtyard participate together in a box of matzos or other food; and in order to carry from the courtyard into the alleyway, or within the alleyway itself, all the courtyards must participate together in a shituf mevo'os. In the case of a fire, however, the Sages were lenient and permitted taking items out into an alleyway in which no shituf mevo'os was made, and this is the "mavoi she'eino mefulash" of the Mishnah.
The view of ben Beseira:
Ben Beseira says in our Mishnah: "Afilu mefulash" - one may take them out even into an alleyway that is mefulash. The Gemara explains that he is referring to an alleyway that has no lechi or korah at its end, which is generally required to permit carrying within it in addition to a shituf mevo'os. In this case we are lenient and permit rescuing items into it, not only without a shituf mevo'os, but even without a lechi.