If a guy scores after reaching base on an error, the pitcher is charged with a run but not an earned run. Furthermore, if an error happens in an inning, any runs that score after two outs are unearned runs (because in that situation, the inning would have been over had the error not occurred).
An error in baseball causes all runners to advance by one position unless they reach first base safely. If the error occurs in an inning other than the first, then it is combined with any other errors made by that team in that game to determine whether there will be an unearned run scored. For example, if an error and a hit by pitch cause three runs to score in an inning other than the first, then those three runs are considered unearned.
If a player reaches first base via a walk or hit by pitch, he is said to be "on base" and can be removed from the game at any time prior to the end of an inning without causing the inning to end prematurely. The only exception to this rule comes when a player attempts to steal second base and is caught by the catcher - in this case, the out(s) resulting from the attempt to steal second base cause the inning to end immediately.
If a player reaches first base on an error, he has not contributed to the tying or winning run coming to the plate.
For the purposes of counting earned runs, a runner who starts an inning on second base under this regulation is considered to be a runner who reached second base due to a fielding mistake, but no error is charged to the opposing club or any player. If that runner scores, the pitcher will not be assessed an earned run. If the runner gets caught in a fielder's tag game and is put out, he cannot return to second base until after another ball is thrown; at that point, if there is still time left in the inning, the batter can replace him by stepping up to the plate. Otherwise, the batter would have to be removed from the game.
If the runner reaches first base safely, an error is recorded against the team with which he entered the game. This rule is only relevant in exhibition games and during spring training, when coaches usually tell their players not to try for extra bases while at second base.
In regular season play, an error does not cost a team any runs, although it can affect how many balls are put into play after the error (see below).
During World War II, it was common for baseball players to reach base via hit by pitch or passed ball, then advance upon safe positions because there were no runners on base. In such cases, where the player advancing to third or home could cause trouble for the opponent, managers would often request defensive shifts to leave them out of scoring position.
An earned run in baseball is any run for which the pitcher is held responsible (i.e., the run scored as a result of normal pitching and not due to a fielding error or a passed ball). Any runner who tags his base and advances to home plate counts as an earned run (or runs) against the pitcher.
In the previous scenario, a runner on third base scores on a passed ball. For the time being, the run is undeserved because the runner should still be in third place. If the batter strikes out to end the inning, it is permanent.
When a hitter reaches base on an error (including catcher's interference) and subsequently scores a run in the same inning, the run is considered unearned. A baserunner remains on base as a consequence of an error on a fielder's choice play that would have put the baserunner out but for the error, and scores as a result. This occurs when the batter who is forced out by the defensive maneuver also reaches base via another method before being thrown out (such as by hitting into a double play).
An unearned run damages a team's chances of winning because it gives the opposing team more time to bat around against the depleted lineup. It is important to note that this rule applies only if the player who reaches first base after the error causes the run to score. If instead, the player who reached first base later in the inning bats again and causes yet another run to score, then that run is also unearned and cannot be used to offset any potential loss due to the unearned run.
This rule was created to prevent teams from gaming the system by using players who reach base via error to their advantage. For example, if a pitcher allows a runner to reach first base on an error and then throws a no-hit game finishing with 11 strikeouts, the team would not be able to use this unearned run to offset a loss. The only way this could happen is if the pitcher who allowed the error to happen starts the next game too.