Overview
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).
From Wikipedia (CC BY-SA 4.0).