Berachos, Chapter 5, Mishnah 3. This mishnah lists several things a person may not say in his prayer, whether as an addition of his own or as a change in the wording, and whoever says them is silenced. The mishnah then discusses a chazzan who erred in his prayer, his replacement, and the point from which the one who takes his place begins.
Three things for which we silence the one who says them:
"Rachamecha higi'u ad kan tzipor" - one who says in his prayer that just as the mercy of the Holy One, blessed is He, extends even to a bird's nest, in the mitzvah of shiluach ha'kan, where one sends away the mother and only afterward takes the young, so too may He have mercy and compassion on us.
"Al tov yizacher shemach" - wording that could mistakenly be understood as though His Name is mentioned only over the good, and Heaven forbid that we would not mention His Name over the bad as well.
"Modim, modim" - one who says "Modim" twice in a row.
The reasons for silencing him:
The mitzvos of the Holy One, blessed is He, do not stem from mercy alone. They contain reasons that are beyond our grasp, and they must not be attributed to mercy alone.
Mentioning His Name over the good alone is improper, for we know that the bad also comes from Hashem.
Repeating "Modim" creates the impression that there are two separate powers at work, and Heaven forbid that we should serve more than one power.
For these reasons, we silence anyone who says one of these things in his prayer.
A chazzan who erred:
A chazzan who erred in his prayer in a way that he could not get back on track even if he were shown his place - for example, he forgot an entire berachah, and even after being reminded he cannot continue - must be replaced. It is worth remembering that this was a time when there were no siddurim, and once he became confused, he had no way of returning to the order of the prayer, and therefore someone else needed to take his place.
Refusing to serve as chazzan:
In such a situation a person should not refuse. Why does this need to be emphasized? Because the Gemara cites a beraisa that if a person is asked to serve as chazzan, he should first refuse. It appears that this rule does not apply when the one asking is the regular gabbai, whose job it is to find someone to lead the prayers, since by refusing he is merely troubling him for nothing; but when it is not a regular gabbai responsible for this, he should indeed refuse at first. In any case, when the congregation is waiting and the chazzan cannot continue, one may not refuse.
Where the new chazzan begins:
In the middle berachos: he begins from the start of the berachah in which the error was made, and repeats that berachah from its beginning.
In the first three and the last three: the first three berachos are considered a single berachah, and so are the last three. Therefore, if the error was made in one of them, he must begin from the start of the first three or from the start of the last three.
In summary: In this mishnah we learned three things for which a person who says them in his prayer is silenced - "Rachamecha higi'u ad kan tzipor", "Al tov yizacher shemach" and "Modim, modim" - and their reasons: that the mitzvos must not be attributed to mercy alone, that His Name must not be mentioned over the good alone, and that no room may be given to the impression of two powers. We also learned the law of a chazzan who erred and cannot find his place again, that he must be replaced; that one may not refuse where the congregation is waiting, even though the beraisa states that one should refuse at first; and where the one who takes his place begins - from the start of the berachah in which he erred, and in the first three and the last three, from the start of those three berachos, which are considered a single berachah.