There are two separate meanings for the term state flag in vexillology – the flag of the government of a sovereign state, and the flag of an individual subnational state, such as a U.S. state, or a Russian oblast.
A state flag is a variant of a national flag (or occasionally a completely different design) specifically designated and restricted by law or custom (theoretically or actually) to use by a country's government or its agencies. For this reason they are sometimes referred to as government flags. In many countries the state flag and the civil flag (as flown by the general public) are identical, but in other countries, notably those in Latin America, central Europe, and Scandinavia, the state flag is a more complex version of the national flag, often featuring the national coat of arms or some other emblem as part of the design. Scandinavian countries also use swallowtailed state flags, to further differentiate them from civil flags.
In addition, some countries have state ensigns, separate flags for use by non-military government ships such as coast guard vessels. For example, government ships in the United Kingdom fly the blue ensign.