How is the 'infield fly rule' invoked and under what conditions?

If baserunners are at 1st and 2nd base, or the bases are loaded with less than 2 out the umpire may call an "infield fly" if the ball is popped up in the infield area and can be caught with "ordinary" effort by an infielder. If the ball is caught the batter is out and the runners may tag up and advance at their own risk. If the ball is dropped the runners may try and advance to the next base at their own risk (they do not need to tag up/or even advance if they dont want) and the batter is still out. If the umpire fails to call it the rule still apllies.

** Infield fly does not apply to bunts or foul balls

-- or line drives.