In baseball, this phrase refers to a hit that lands in foul territory on the baseball field. On a baseball diamond, the area in front of home plate between first and third base is considered "fair". Outside the first and third base lines and behind home plate is considered "foul" territory. When a batter swings at a ball and hits it into foul territory, he or she is assessed a strike, unless it would be his or her third strike, in which case no strike is assessed and the player continues the at bat. If the ball is hit on the ground in fair territory in front of the plate but rolls into foul territory before an opposing player has touched it, the ball is considered "foul". If the ball is hit in the air into foul territory and is caught by the defense, the hitter is out.
A batter who fouls the ball off a lot is usually swinging too late. This happens because the point of impact of bat on ball is usually off to one side of the bat, thereby causing the ball to go too far in one direction. A batter waiting for a better pitch who already has two strikes will sometimes swing at balls he or she knows will go foul in order to stay at the plate and keep the pitcher working hard to get him or her out. This can sometimes be a beneficial strategy if the starting pitcher is going late into the game and getting tired.