Fair ball signal from umpire
Author: David Beach, PDM, via Wikimedia
When a batter hits the ball, it will either go into fair territory or foul territory. Fair territory is the area between the foul lines. The foul lines are formed between home plate and first base and home plate and third base. They extend all the way to the outfield. The lines themselves are considered fair territory.
Foul Ball
If a ball is foul and the batter has less than two strikes, then he will be given a strike. If the batter has two strikes, he is not given a third strike and the "at bat" continues. It doesn't matter how many foul balls the batter hits, he cannot get a third strike from a foul ball.
Once a ball is called foul, the play is dead. The batter returns to home plate and any base runners return to their original bases.
Infield Foul Balls
Determining a foul ball in the infield is slightly different than in the outfield. In the infield a ball is not ruled to be fair or foul until it comes to a complete stop, until a player touches it, or it goes into the outfield.
A ball in the infield may start out fair and then roll foul. For this reason some defensive players may decide to let the ball roll foul if they think they can't get the batter out. They may also try to field the ball quickly and get the batter out before the ball can roll foul. Even if the ball goes back and forth between being fair and foul, it will not be ruled as fair and foul until it stops or a player touches it.
Outfield Foul Balls
In the outfield a ball is determined to be foul by its relationship to the line when it first touches the ground or is touched by a player. So if a ball hit in the outfield lands in fair territory and then rolls foul, it is a fair ball. This is different than with the infield.
If an outfield ball is touched by a player, it doesn't matter the position of the player. The only thing that matters is the position of the ball to the foul line at the moment the player touches it.
Catching Foul Balls
If the defense catches a foul ball, the batter will be called out.
Home Plate
Home plate is considered part of the field and is fair territory.