A flagship, in naval operations, is the vessel from which the senior officer of the formation commands. Admirals, for instance, are termed "flag officers" for a characteristic flag denoting their rank when they are aboard or assigned to that vessel. The flag itself may also be notable in some way, as, for example, when Admiral Chuichi Nagumo hoisted, on December 7, 1941, the same "Z" flag that Admiral Heihachiro Togo had hoisted to start the Battle of Tsushima in 1905.
In a very large formation, there may be flagships for the commanders of subordinate units. These flags may indicate rank (e.g., vice admiral), or, especially in the days of sail, an organizational identifier (e.g., rear admiral of the red [squadron]).
Flagship roles are sometimes symbolic rather than actual. HMS Victory, a wooden ship of the line built in 1765, is the official flagship of the United Kingdom Home Command. She served as the flagship of Horatio Nelson at the Battle of Trafalgar. On taking command of the U.S. Pacific Fleet after the Battle of Pearl Harbor, Chester Nimitz, who actually directed operations from his headquarters ashore, formally took command of the fleet on the deck of the submarine USS Grayling.
An admiral will be said to be "flying his flag" on a given vessel. Until into the middle of the Second World War, admirals usually used a major combatant vessel such as a ship of the line or battleship. Under some circumstances, when the admiral's attention was needed close inshore, he might board a smaller, handier vessel. As electronics became more important, it became obvious that ships with heavy guns were a bad choice for a flagship; the shock of the guns firing tended to break the fragile electronics of the time. WWII commanders became more likely to use aircraft carriers or purpose-built command ships, (e.g., USS Mount McKinley (AGC-7).
In modern warships, gunnery shock is not a major concern, but certain ships have space set aside for an admiral's staff. These include aircraft carriers, command ships, and, in the U.S. Navy, cruisers Ticonderoga-class. The additional space and communications is one of the features that distinguishes a Ticonderoga from a similar destroyer of the Burke-class. Large amphibious warfare ships also often have staff spaces as part of their design.