A flag is a piece of cloth hung from a pole for signalling (as in semaphore) or to identify the bearer, in this sense also called a standard. A national flag is one of the important official symbols of a nation or country. The study of flags is known as vexillology.
Some particularly famous or interesting flags are:
See national flag for information on national flags of other countries.
Subdivisions of countries frequently have flags. Government agencies and educational or other private institutions also sometimes have flags. The United Nations has a flag. The European Union also has a flag (see European flag).
A great many specialized flags are used to signal between ships or from ship to harbour in ship transport. An example is an entirely yellow flag, which means that the ship's crew is quarantined for an infectious disease.
A flag can also be an indicator, as in a "red flag" (a sign that something is amiss).
American Football referees use flags to indicate an error has been made in game play. The term used is flag on the play. The flag itself usually is a small, bright yellow handkerchief, rag, or similar. The idea being, since there is mass-chaos on the game field, it will suffice to simply throw out a flag, and sort out the details after the current round of game play has concluded.
In auto racing flags are used to communicate with drivers. In particular a white and black checkered flag is used to communicate victory.