Fleet organization

Space fleets were generally organized into hierarchical groups for specific strategic purposes. Vessels could operate in those groupings in various situations either permanently or over a short period of time.

Unit
Ships of the same type were referred to as units. Starfleet used several Destroyer Units during Operation Return. 

Squadron
Squadrons were a small group of generally three to five ships. Although the exact number of vessels could vary, a Klingon squadron of Birds-of-Prey consisted of five ships, whereas a squadron of Jem'Hadar attack ships usually was comprised of three. 

Starfleet only organized small ships like their attack fighter in squadrons. 

Wing
A wing was a grouping of several ships for a specific purpose. Depending on the military, a wing could consist of a different number of ships. Usually, wings were named by the specific mission type. The UFP Starfleet used attack wings and tactical wings. The command of a permanent wing such as the seventh tactical wing required an officer superior to the rank of captain in command, other non-permanent wings such as cruiser or Galaxy wings could also be commanded by a captain. 

In the Klingon Defense Force an attack wing consisted of at least seven Birds-of-Prey and two capital ships, mostly. 

Battle group
Battle groups consisted of an arbitrary number of ships, usually gathered temporary for a single mission that mostly involved combat. Starfleet assembled a small battle group to assist the USS Enterprise (NCC-1701-E) during a Reman incursion. 

General Martok of the Klingon Empire organized a fleet of 1,500 ships into small battle groups for hit-and-run attacks against the Dominion. 

Task force
A task force was a fleet of ships for a special task such as assault, protection or diplomacy and was generally bigger than the relatively small battle group. Like the battle group, the number of ships in a task force could vary greatly: There were small task forces consisting of only nine ships and large ones consisting of several hundred. 

In Starfleet, a task force was usually commanded by an admiral, or in some cases a captain. 

Numbered fleet
Starfleet organized all ships in numbered fleets. A numbered fleet consisted of several hundred ships, all localized in a specific region of space. There were at least nine numbered fleets operating in Starfleet. 

The Cardassian military used the term "order" rather than "fleet".

Admiralty
In the 18th century, the Admiralty was the highest authority responsible for all naval operations; this term was used to describe all ships and vessels in a space fleet.

In Starfleet this authority was known as Starfleet Command and Commander-in-Chief. 

The Cardassian military took its orders from the Cardassian Central Command, while the highest military authority within the Dominion were the Founders.