Etymology
Today it means: The ship occupied by the fleet's commander (usually an admiral); it denotes this by flying his flag. Full definition →
From flag + ship.
Etymology from Wiktionary, CC BY-SA 4.0.