Original: In military terms, it is a ship used by the commanding officer of a group of naval ships.
Simplified: A flagship is the ship used by the officer who commanded a group of naval ships.