Mikvaos, Chapter 8, Mishnah 1. One piece of background opens the way into this mishnah. Chachomim ruled that the soil of the nations, eretz ha'amim, meaning any territory beyond the borders of Eretz Yisrael, conveys tumah as though it were the tumah of a corpse, so that whoever travels abroad contracts tumas meis. Inside Eretz Yisrael they issued no such ruling. Even a region whose residents were almost entirely gentile was left free of any rabbinic tumah attaching to its ground.
Eretz Yisrael and its mikvaos
The mishnah opens: "Eretz Yisrael tehorah", the Land of Israel is tahor. It does not carry the rabbinic tumah that applies to the lands of the nations of the world, and this holds true even for a city in Eretz Yisrael whose inhabitants are for the most part non-Jews.
"Umikvaoseha tehorim", and its mikvaos are tahor. A gathering of water that a person comes upon in Eretz Yisrael carries a chazakah; we assume that it was formed in a state of taharah, in accordance with the halachos of a mikveh, and it is fit for the tevilah of those who are tamei.
Mikvaos of non-Jews outside the Land
The mishnah continues: "Mikvaos ha'ovdei chochavim". Here we are speaking of a gathering of water found outside Eretz Yisrael, in a non-Jewish settled area. In such a place we must reckon with the strong likelihood that what we are looking at was constructed as a pool and was never intended to serve as a mikveh. The water in it is therefore presumed to be she'uvim, drawn water, and it is pasul for tevilah, even if to the eye it seems to conform to the requirements of a mikveh. We nonetheless assume it is a pool whose water was not gathered in the manner that the halachos of a kosher mikveh demand.
Even granting that presumption, the mishnah declares such water "ksheirim leba'alei keri". Ezra enacted that a ba'al keri, a man who experienced an emission, would immerse before learning Torah or davening. The immersion of that enactment was not held to the usual standards of a kosher mikveh, and it could be performed even in water that carries the status of she'uvim. "Va'afilu nismal'u bekeilim", and the immersion counts even where the water arrived through vessels or through a pipe.
A point worth adding: a later generation of Chazal annulled tevilas Ezra, since they saw that the general public was unable to keep it. In Ezra's own time, however, someone who had access only to water he knew had been brought in through pipes, water utterly unfit for an ordinary mikveh, was still able to fulfill this enactment by immersing in it.
Which mikvaos in Eretz Yisrael are relied upon for what
The mishnah now comes back to the mikvaos of Eretz Yisrael, whose presumption of taharah it had established at the start, and draws a distinction based on location. "Chutz lamiftach": a mikveh situated past the entrance, meaning outside the built-up area of the town, is described as "ksheirim af laniddos", fit even for a niddah to use. That is a striking ruling, since niddah is a tumah whose violation involves an issur kareis and immersion is precisely what lifts it, yet the mishnah grants these mikvaos enough reliability for her tevilah.
"Milifnim min hamiftach, ksheirim leba'alei keri ufsulim lechol hatemei'im". A mikveh found within the city is relied upon only for the tevilah of a ba'al keri, and is invalid for all other temei'im. The reason is the traffic of the townspeople: we are concerned that residents used this water for laundering and for rinsing their vessels, drawing water out and pouring water back in, in a manner that would have rendered the water she'uvim.
"Rabbi Eliezer omer: hakerovim la'ir uladerech, temei'im mipnei hakevisah". Rabbi Eliezer broadens the worry. A mikveh may stand outside the town, but if it is situated near the town or near the roadway, he treats it as tamei, out of suspicion that passersby did their washing there and left the water in the category of she'uvim; it cannot then be trusted by anyone whose tevilah must lift a severe tumah. "Harechokim, tehorim": mikvaos set far off remain tahor, for we do not suppose that people bothered walking such a distance to launder. A mikveh like that keeps its status as a proper mikveh of mei geshamim.