Players on the batting team take turns hitting against the pitcher of the fielding team, which tries to prevent runs by getting hitters out in any of several ways. A player on the batting team can stop at any of the bases and later advance on a teammate's hit or other means. The teams switch between batting and fielding whenever the fielding team records three outs. One turn at bat for both teams, beginning with the visiting team, constitutes an inning, and nine innings a game. The team with the most runs at the end of the game wins.