Referees perform a surprisly large number of tasks before and after a match. These include checking the goals, nets and balls and deciding whether the pitch and weather conditions are suitable for the game to go ahead.
Afterwards, they write a report containing details of disciplinary actions and other important incidents.
On the pitch, the referee runs the game. His or her duties range from adding on time because of injuries, other stoppages and time-wasting, to deciding whether the ball is in or out of play or has crossed the goal line.
If a player commits a foul or breaks a law, referees must stop play and order a restart, such as a drop ball or a free kick.
They can caution players and team officials, and even abandon a match if weather, crowd trouble or any other factor makes the game unplayable.
Referees have to follow the laws of the game, but they have a certain amount of freedom to interpret aspects of the rules as they wish.
For example, if a player is fouled when his or her side is in a promising position, a referee may let the match continue, playing the advantage rule to keep the game flowing.
Assistants and the fourth officials
A referee relies on his or her assistants as extra pair of eyes. Referee assistants indicate when the ball goes out of play and whether a goal kick, corner or throw-in should be awarded.
They also use the flag signals to point out that a substitution has been requested, a player is offside or whether an offence has taken place out of the view of the referee.
A referee can consult with an assistant if he or she was closer to the action, but it is up to the referee to make the final decision.
In some competitions, a fourth official carries out duties before and after a match and also performs touchline tasks.
These include helping with substitutions and displaying the amount of time added on at the end of a game for stoppages.