(covers information from several alternate timelines)
Starfleet Command, or Spacefleet Command, was the operating authority of Starfleet, the exploratory, scientific, and military department of United Earth before being integrated into the United Federation of Planets in 2161. The organization's primary management center was located at Starfleet Headquarters in San Francisco, Earth. (Star Trek IV: The Voyage Home; DS9: "Homefront", "Paradise Lost"; VOY: "Endgame")
In 2151, Enterprise captain Jonathan Archer met with Admiral Maxwell Forrest, Admiral Daniel Leonard, Commander Williams, and other Human and Vulcan officials at Starfleet Command to decide how to proceed with delivering the wounded Klingon Klaang back to Qo'noS. (ENT: "Broken Bow")
Later that month, Enterprise was recalled after the Xindi attack on Earth, and Archer went to Starfleet Command to discuss the attack, plan a response, and gain clearance to search for the Xindi weapon. (ENT: "The Expanse")
Starfleet Command was also host to the conference Nathan Samuels conducted to form the Coalition of Planets. The xenophobic organization Terra Prime planned to destroy the complex with a blast from the hijacked verteron array on Mars. The leader of Terra Prime, John Frederick Paxton, managed to fire the array after Archer, Malcolm Reed, Travis Mayweather, and Phlox launched a raid. However, thanks to sabotage by Enterprise chief engineer Charles Tucker III, the blast was redirected into San Francisco Bay. After the crisis passed, the conference resumed. (ENT: "Demons", "Terra Prime")
Besides the fleet, Starfleet Command also oversees the various other branches of Starfleet.
Because of the time delays involved in many subspace communications, Starfleet Command also includes a network of administrative and support outposts known as starbases throughout the Federation. Starfleet's starships operate out of these starbases under the supervision of various admirals, the senior officers of the fleet.
In 2286, Starfleet Command, along with the rest of Earth was threatened by the Whale Probe until Admiral Kirk and the crew of the late Starship Enterprise stole a Klingon Bird-of-Prey, which was renamed HMS Bounty by Dr. McCoy. Kirk and crew brought aboard a pair of Humpback whales called George and Gracie. These whales were the prized attraction of the Cetacean Institute in Sausalito, California. Also brought aboard was marine biologist Gillian Taylor, an employee of the institute from 1986. Kirk brought his new passengers back to 2286, at which point the whales communicated with the probe; it presumably returned to its place of origin.
By 2364, Starfleet Command had been infiltrated by neural parasite aliens, who had physically taken control of the bodies of several high-ranking Starfleet officials, including Admiral Gregory Quinn, Admiral Aaron, and Admiral Savar. The parasitic mother creature resided in the body of Lt. Commander Dexter Remmick. The aliens were prevented from taking over Starfleet Command by Captain Jean-Luc Picard and Commander William Riker of the USS Enterprise-D, who, by destroying the mother creature, killed all alien parasites on the planet. (TNG: "Conspiracy")
In late 2373, Starfleet Command made a decision that would change the Federation forever. They agreed with Benjamin Sisko that no more Dominion ships could be allowed into the Alpha Quadrant. The mining of the Bajoran wormhole became the catalyst of the Dominion War. (DS9: "Call to Arms")
After Captain Sisko contacted Starfleet Command about Section 31, Starfleet Command did not acknowledge its existence and did not deny it either. Sisko was informed by Starfleet Command that they would look into it. The Starfleet Command investigation into Section 31 would later be shelved. (DS9: "Inquisition", "Inter Arma Enim Silent Leges")