This article relies largely or entirely on a single source. (July 2013)
The hit and run was introduced to baseball by Ned Hanlon, who was often referred to as "The Father of Modern Baseball", at the beginning of the 1894 season of the National League, as part of what came to be called "inside baseball". Hanlon was manager of the Baltimore Orioles at the time. His team developed the hit and run along with other tactics during spring training at Macon, Georgia. After its implementation in the season's series opener against the New York Giants, the opposing manager objected to its use; however, it was deemed acceptable. 
The hit and run relies on the positioning of the defensive players in the infield. The first and third basemen normally stand close to the lines, generally near their bases but slightly closer to home plate. The second baseman and shortstop stand on opposite sides of second base, covering the areas between first and second, and second and third, respectively. Second base itself is not directly covered, as the pitcher can field batted balls in this direction.
In normal play, if the ball is hit into the infield, one of the players will run toward the ball while another runs toward the base that is no longer covered. For instance, if the ball is hit toward the second baseman, he will run toward the ball while the shortstop runs toward second base. This allows the fielding player to throw the ball to the player on the base to attempt a put out.
However, during a stolen base attempt, the normal gameplay and positioning is altered. In the typical case, a baserunner on first base will start running toward second, causing the infielders to move toward that base in order to tag the runner when the ball is thrown to them from the pitcher or catcher. This reaction places the infielders out of position for a hit ball, with gaps opening at midway points between first and second and second and third.
The hit and run takes advantage of this difference by having the baserunner attempt to steal as soon as the pitch is thrown; the batter then attempts to hit the ball into one of the resulting gaps in the infield defense.
The name "hit and run" is therefore a potential misnomer in that the chronological order of the offensive play is "run and hit," with the runner beginning the steal attempt before the batter makes contact, although in a logical sense it is accurate in that the batter's swing occurs while the runner's steal attempt is ongoing, such that any contact ("hit") will occur simultaneously with ("and") the steal attempt ("run").
Ideally, the ball will be hit into a gap and travel into the outfield, allowing the runners plenty of time to reach the bases. Even if the ball is hit toward a fielder's initial position before the fielder has had time to move away from it, however, the fielder may have turned to run toward the base in order to cover the baserunner. In normal play the fielders would face the batter, allowing them to react in any direction, but after they have turned toward the base this becomes much more difficult. Their momentum in this direction adds to this problem.
The hit and run also has defensive qualities. In normal play the baserunner would start toward second base when the ball was hit. If the defensive players react fast enough, they may be able to throw the ball to second and first before either runner has reached their base, resulting in a double play. In the case of the hit and run, the baserunner has a head start, increasing the baserunner's probability of reaching second base before the ball. This may force the fielders to attempt the out only at first, thereby advancing the runner. It may also allow the runner to advance more bases on a hit than he might otherwise due to that running head start. Although a line drive can easily turn into a double play, line drives are rare so the risk of being doubled off from a line drive is minimal.
The risk in the hit and run is that, if the batter fails to make contact with the ball, the runner is vulnerable to being thrown out at second base, which the official scorer will record as a caught stealing.[note 1] The defensive team can improve its odds in this case by using a pitchout, having the pitcher throw the ball far outside the strike zone so the catcher can easily catch it and attempt to pick off the runner.
The batter may choose to take a swing at a bad pitch to make it harder for the catcher to handle the incoming pitch, or so the ball goes foul (in which case the runner is allowed to return to first, so the attempt protects the runner from being caught stealing). Either way, this can cause the batter to fall behind in the count, making it harder for him to get a hit. And if he does hit a bad pitch he really can't handle, it could result in poor contact leading directly to the batter being put out, so he may end up giving his at-bat away with no advantage to the offense.
The hit and run has the best chance to be successful when the batter is someone who does not frequently swing and miss, at a time when the count won't disadvantage a hitter if he takes a bad swing, with a runner fast enough to take second base even if the batter does swing and miss.
Often the precise circumstance to call for a hit and run occurs with a two-balls, one-strike count on a hitter, as this situation may meet all of the above criteria, depending on who is at bat and who is on base, but it can occur at other times. An alert defense understands the probability that the offense will call the play at a specific moment, and thus it may choose to call for a pitchout at that moment to defend it. An alert offense, in turn, understands the probability of a forthcoming pitchout, and use the hit and run opportunity as a decoy, causing the pitchout to become another ball in the count in the hitter's favor, increasing his chances of reaching base by walk or hit.
The hit and run is a very old baseball strategy, dating back to the 19th-century game.