Extra time is played, when at the end of the match for which there must be a winner (ie a knockout, final or cup match), both teams have the same number of goals1.
Law 10 - Determining the Outcome of a Match, Section 2 - Winning Team:
When competition rules require a winning team after a drawn match or home-and-away tie, the only permitted procedures to determine the winning team are:
- away goals rule
- two equal periods of extra time not exceeding 15 minutes each
- kicks from the penalty mark
A combination of the above procedures may be used.
Teams have no say in whether extra time is played and cannot request more. The full time allotted (usually two equal periods of 15 minutes) must be played, and if the scores are level after this time, kicks from the penalty mark must be used to determine the winner.
If the competition rules do not allow kicks from the penalty mark to be used, the match is drawn and the teams must be separated (for the purposes of qualification, or deciding the winner of the final or cup being contested) by some other procedure - such as a replay, a coin toss, or some other method as determined by the competition rules or competiton administrator.
Extra time is commonly confused with the allowance for time lost (or, as it also known, additional time) played at the end of each period to compensate for significant delays to restarts during the period. The term extra time should only be used to refer to the procedure used to determine the winner at the end of a drawn match.
1 - in some competitions, the away goals rule is used - in these competitions, extra time is only played if the teams cannot be separated based on both the aggregate score over both of the home-and-away matches and the number of away goals scored.