In the sport of cricket, a declaration occurs when a captain declares their team's innings closed and a forfeiture occurs when a captain chooses to forfeit an innings without batting. Declaration and forfeiture are covered in Law 15 of the Laws of Cricket. This concept applies only to matches in which each team is scheduled to bat in two innings; Law 15 specifically does not apply in any form of limited overs cricket.

Declaration
The captain of the batting side may declare an innings closed, when the ball is dead, at any time during a match. Usually this is because the captain thinks their team has already scored enough runs to win the match and does not wish to consume any further time batting which would make it easier for the opponents to play out for a draw. Tactical declarations are sometimes used in other circumstances.

Frank May proposed at the Annual General Meeting of the Marylebone Cricket Club on 2 May 1906 that in a two-day match, the captain of the batting side has power to declare their innings closed at any time, but such declaration may not be made on the first day later than one hour and forty minutes before the hour of drawing stumps. After some discussion the resolution was passed. 

A captain considering declaration must balance the risks of declaring too early (thus setting too low a target for the opposing team) against those of declaring too late or not at all (thus making it easier for the opponents to force a draw preventing the completion of the match).

The first captain to declare was Charles Wright in 1890. In a game against Kent at the Bat and Ball Ground in Gravesend, Wright declared Nottinghamshire's second innings closed on 157 for 5 to set Kent a target of 231 to win. The tactic nearly paid off as the game was drawn with Kent on 98 for 9 and Nottinghamshire requiring one more wicket to win.

Before declarations were made legal, batsmen of a team that wanted to get the other team to bat again would deliberately get themselves out, leading to some farcical situations, where the fielding side would make no attempt to dismiss a batsman who was trying to be dismissed.

Forfeiture

Under the current Laws, a captain may forfeit either of their side's innings. A forfeited innings shall be considered as a completed innings. Usually this happens in shorter competitive two-innings matches, where captains need to agree with each other how to set up the match so that there is a reasonable chance of a result. Winning a game gains a team considerably more points than drawing it, so captains are often willing to risk giving the opposition an opportunity to win that they otherwise would not have had as long as they are getting a similar opportunity in return.

In August 2020, in a rain-affected match between Durham and Leicestershire in the 2020 Bob Willis Trophy, both teams agreed to forfeit an innings in an attempt to produce a result.

Test cricket

Only one innings has been voluntarily forfeited in Test cricket. This was on 18 January 2000 at Centurion, South Africa, in the fifth and final Test between South Africa and England. South Africa had already won the series, as they were up 2–0 (with 2 matches drawn) after the first four matches. After South Africa scored 155 for 6 on the first day, rain washed out the next three days. With only one day remaining, the match was set for a certain draw.

That was until Hansie Cronje, the South African captain, entered into a deal with his English counterpart, Nasser Hussain, that South Africa would continue batting till they reached about 250 and then declare. England and then South Africa would then both forfeit an innings, leaving England approximately 250 to win (in the event the target was 249). At that time, the laws only permitted a side to forfeit its second innings, so England's first innings was treated as having been declared at 0 for 0 after 0 balls. England went on to score 251 for 8 and win by 2 wickets. Many of the South African team criticised Cronje at the time for setting too low a target.

It later emerged that Cronje had been approached by a bookmaker, and asked to ensure the game would end with a positive result. Nasser Hussain and the England team were not aware of this at the time, taking the South African request at face value.

References 

Cricket captaincy and tactics
Cricket laws and regulations