With runners on first and second base, or the bases loaded and zero or one out, a ball hit in the air that does not go past the infield (or fifteen feet into the outfield). The batter is automatically declared out, thus preventing the fielders from purposely dropping the fly ball in an attempt to force out runners.
The Infield Fly Rule is a rule in baseball (specifically, rule 6.05e, coupled with the definition in rule section 2.00) that prevents unfair gamesmanship by the fielders. The infield fly rule applies when there are fewer than two outs, and there are runners on first and second base, or on first, second and third base. In these situations, if a fair fly ball is hit that, in the umpire's judgment, is catchable by an infielder with ordinary effort, the batter is out regardless of whether the ball is actually caught in flight.