This is a rule in baseball used to prevent the defense from purposely dropping an easily catchable ball in order to execute a double or triple play. The rule states that if there are less than two outs and there is a potential force out at third base (runners on first and second), a ball hit in the air in the infield is declared an infield fly and can be caught with ordinary effort by the defense, the batter is automatically out, regardless of if the ball is caught. If the ball is caught, the runners on base may tag up; if the ball is dropped, the runners may advance at their own risk of being put out.
The rule has been in effect for a long time, since 1895, to prevent easy double and triple plays. If there are runners on first and second, and the hitter pops it up to second base, the shortstop may just left the ball drop, then step on second and throw the ball to first for a double play. The infield fly rule prevents that from happening. It is up to the umpires to declare that the infield fly rule is in effect, which means they judge whether or not a catch can be made with "ordinary effort."