Before a match begins, the team captains (who are also players) toss a coin to decide which team will bat first and so take the first innings.[63] Innings is the term used for each phase of play in the match.[63] In each innings, one team bats, attempting to score runs, while the other team bowls and fields the ball, attempting to restrict the scoring and dismiss the batsmen.[64][65] When the first innings ends, the teams change roles; there can be two to four innings depending upon the type of match. A match with four scheduled innings is played over three to five days; a match with two scheduled innings is usually completed in a single day.[63] During an innings, all eleven members of the fielding team take the field, but usually only two members of the batting team are on the field at any given time. The exception to this is if a batsman has any type of illness or injury restricting his or her ability to run, in this case the batsman is allowed "A Runner" who can run between the wickets when the batsman hits a scoring run or runs.[63] The order of batsmen is usually announced just before the match, but it can be varied.[58]
If a fielder is injured or becomes ill during a match, a substitute is allowed to field instead of him, but the substitute cannot bowl or act as a captain. The substitute leaves the field when the injured player is fit to return.[74] The Laws of Cricket were updated in 2017 to allow substitutes to act as wicket-keepers,[75] a situation that first occurred when Mumbai Indians' wicket-keeper Ishan Kishan was injured in a match on 18 April 2018.[76]
In cricket, the rules of the game are specified in a code called The Laws of Cricket (hereinafter called "the Laws") which has a global remit. There are 42 Laws (always written with a capital "L"). The earliest known version of the code was drafted in 1744 and, since 1788, it has been owned and maintained by its custodian, the Marylebone Cricket Club (MCC) in London.[57]
The main objective of each team is to score more runs than their opponents but, in some forms of cricket, it is also necessary to dismiss all of the opposition batsmen in their final innings in order to win the match, which would otherwise be drawn.[66] If the team batting last is all out having scored fewer runs than their opponents, they are said to have "lost by n runs" (where n is the difference between the aggregate number of runs scored by the teams). If the team that bats last scores enough runs to win, it is said to have "won by n wickets", where n is the number of wickets left to fall. For example, a team that passes its opponents' total having lost six wickets (i.e., six of their batsmen have been dismissed) have won the match "by four wickets".[66]