Other contributors have said "When can an infield fly be called?" is the same question as "When does infield fly rule apply?". If you believe that these are not asking the same thing and should be answered differently, click here.
When does infield fly rule apply?
Answer:
The infield fly rule is in effect when ...
1) there are less than two outs
2) there are runners on first base and second base OR runners on first base, second base, and third base
and the batter hits a pop fly, in fair territory, that can be caught by an infielder using reasonable effort. The batter is automatically out and the base runners may advance at their own risk.
The infield fly rule was created to keep the defense from gaining an unfair advantage based on a pop fly. For example, let's say there are no outs and runners on first and second. The batter hits a pop fly that will wind up landing about three feet from third base in fair territory. Since the ball is in the infield, the base runners must stay very close to their bases because the ball will most certainly be caught by the third baseman. If the runners stray too far off their bases, after catching the ball the third baseman will be able to throw to a fielder covering the base the runner was on before they get back to the base and create a double play. So, in this situation, the base runners must be concerned about getting back to the base they were on and not about advancing to the next base. If there was no infield fly rule, the third baseman could allow the ball to hit the ground, pick the ball up quickly, touch third base for one out, and throw to a fielder covering second base for a double play.