

I found this part to be the most interesting... I doctored it slightly, because well, it made more sense this way. Whoever organized the artical was well... A little less than organized. BUT NOT MINE OK!!!
In the 22nd century, Starfleet was a civilian organization which adopted many aspects of Earth's earlier military forces, even though its main role was scientific development and exploration. Ranks within Starfleet closely follow the traditions of the United States Navy and the British Royal Navy.
Starfleet officers functioned as commanders and directors of the service’s operations at all levels. The most senior officers ranks were known as Flag officer ranks. Officers holding these ranks functioned at the highest levels of command in the service. Flag officer ranks, in descending order of the chain of command, are as follows:
Prior to 2161, Starfleet was the primary space defense and exploration organization of United Earth in the early-to-mid-22nd century. The primary authority of Starfleet was referred to as either Starfleet Command or UESPA (United Earth Space Probe Agency) under the jurisdiction of the Command Council, and was located in the city of San Francisco, Earth. (ENT: "Broken Bow", "Terra Prime")
The primary purpose of Starfleet from its infancy was to "...seek out new life and new civilizations." and "...go boldly where no man has gone before." (This quote is attributed to Zefram Cochrane, the inventor of warp drive on Earth.) (ENT: "Broken Bow")
In 2153, following the Xindi attack on Earth and the numerous firefights that the Enterprise NX-01 had been involved in since its launch in 2151, it was determined that vessels of Starfleet would begin to carry detachments of United Earth's elite military unit, the MACOs, thus taking a step towards the unification of the Earth Starfleet and the Earth military – and of the roles of defense and exploration. (ENT: "The Expanse")