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.
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. (DS9: "Once More Unto the Breach", "The Jem'Hadar")
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. (DS9: "Sacrifice of Angels", "Behind the Lines")
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-E during a Reman incursion. (Star Trek Nemesis)
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. (DS9: "Improbable Cause", "Sacrifice of Angels")
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. (DS9: "Favor the Bold")
The Cardassian military used the term "order" rather than "fleet".
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.