Baseball is a bat–and–ball game played between two teams of nine players. The game proceeds when a player on the fielding team, called the pitcher, throws a ball which a player on the batting team tries to hit with a bat. The player on the batting team who hits the pitched ball is then called out. The teams switch roles when the fielding team gets three outs. The game proceeds until one of the teams has won, either by being the fielding team to successfully get three outs, or by having scored more runs than the other team at the end of a set number of innings.