Batting out of turn is one topic that confuses a lot people. If it is caught early, the next course of action is fairly easy to understand. If there are runners on base, especially if they advance during a play, it becomes a little more difficult.
Luckily, the rulebook is through in its description of what could arise, and hopefully this version in plain English will help you be able to explain it to your friends the next time it happens at the park. I will use the names the rulebook used for examples.
The first thing to know: The only way something occurs when a team bats out of order (outs are called, runners are moved back, the correct batter is brought in to bat, etc.) is if the defensive team appeals (explains the situation) to the umpire. It is not the umpire or official scorekeeper’s job to bring incorrect batting orders to the attention of anyone; this responsibility lies with the managers and players.
Second: If an incorrect batting order goes unnoticed by the defensive team and no appeal is made, the order shall continue with the batter after the player that actually batted.
Example: The order is Abel-Baker-Charles; Baker improperly bats in Abel’s place, but no appeal is made, the next batter shall be Charles (skipping Abel).
Three: If either team realizes that the current batter is hitting out of order, he can be replaced during the at bat. Whichever team realizes the mistake shall bring it to the attention of the umpire and the correct hitter will take over the at bat; if there is a count it shall remain the same.
Four: If a batter bats out of turn and an appeal is made by the defensive team before another pitch is thrown (by either team) the batter shall be called out.
Example: The order is Abel-Baker-Charles; Baker improperly bats in Abel’s place, the defensive team appeals the play, Abel is called out, Baker is the batter.
Five: If situation four occurs, any runners who advanced due to the result of the illegal at bat shall be returned to their original base (including any runners who score). If the runners advanced during the illegal at bat due to a stolen base, balk, wild pitch, or passed ball they shall not return to their original base.