Starfleet Medical was a department of Starfleet dedicated to biological research and treatment of personnel. Based out of San Francisco on Earth, Starfleet Medical oversaw all Starfleet medical personnel and facilities.
In the 23rd century, an office existed known as the Starfleet Surgeon General which held some command authority over Starfleet Medical, including the power to relieve starship medical officers for incompetence. (TOS: "Turnabout Intruder")
It was also responsible for all medical research activities in the Federation. Researchers were required to obtain approval from Starfleet Medical before proceeding with new treatments and medications. (TNG: "Ethics")
In 2151, the Klingon courier Klaang was brought to Starfleet Medical after being shot with a plasma rifle while on Earth. There, he was treated by Doctor Phlox, who had been stationed at Starfleet Medical through the Interspecies Medical Exchange. Captain Archer subsequently asked Phlox to join his crew as the chief medical officer aboard Enterprise NX-01. (ENT: "Broken Bow")
In 2369, Doctor Julian Bashir told a Bajoran woman he dated in the Replimat about his exam at Starfleet Medical. (DS9: "Q-Less") Shortly thereafter, he told Major Kira Nerys that he learned, in his first year at the medical school, never to trust a tricorder. (DS9: "The Passenger")
Odo visited Starfleet Medical in 2372, where they performed medical tests on him to gain information that could be used against the Founders. It was during this examination that Odo was infected with a morphogenic virus by the covert intelligence group Section 31. (DS9: "When It Rains...")
Odo contracted the morphogenic virus in late 2375, a disease that had already begun killing the Founders of the Dominion. Starfleet Medical was unwilling to assist Julian Bashir in his research for a cure and refused him access to Odo's medical file, believing Bashir was trying to help the enemy. When Benjamin Sisko requested the file, they sent a copy of Mora Pol's medical file on Odo, taken decades previously, in an attempt to hinder Bashir's efforts. (DS9: "When It Rains...")
In an alternate timeline, in which it took the USS Voyager twenty-three years to return to Earth, Tuvok was sent to live at Starfleet Medical, having succumbed to a mental condition while aboard in 2378. The holographic Doctor of Voyager was working at the medical facility in 2404 and was helping Tuvok, as well as working on the project to develop chronexaline. (VOY: "Endgame")