The Star Trek universe depicts Earth as a member world of a united and peaceful Federation, the borders of which are protected by Starfleet, an organization that showcases the best of what each member world has to offer.
Starfleet grew out of a period on Earth known as the “Post Atomic Horror.” After World War III in the mid-21st century, the planet descended into chaos, which only ceased after first contact with the peaceful alien race known as the Vulcans. The realization that humanity was no longer alone in the universe prompted those in charge to get their act together, fast. By the mid-22nd century, Starfleet was Earth’s primary arm for space exploration.
At the time, Starfleet was made up of a bunch of cocky test pilots. It was after the invention and extensive testing of an advanced warp drive that the Vulcans supervised the still-troubled Earth’s construction of their first deep-space exploration vessel, the Enterprise NX-01. Captained by Jonathan Archer and with a crew of enthusiastic but unseasoned fellow astronauts, plus a Vulcan liaison officer named T’Pol, the NX-01 would go down in history as one of Earth’s most successful ventures into unknown space. Their adventures were chronicled in the series Star Trek: Enterprise.
By the 23rd century, and with the formation of the United Federation of Planets (UFP), the name “Starfleet” was adopted for the collective space exploration force of the entire UFP. Tasked not only with exploration but also diplomacy, humanitarianism, research, and — when the tense political climate of the galaxy called for it — military defense, Starfleet was a robust and wide-ranging organization. One of the most well-known captains of the era was James Kirk (of The Original Series), who commanded a new USS Enterprise on a five-year mission into deep space, which saw the crew make contact with a myriad of new worlds and survive innumerable dangers.
Serving in Starfleet was the dream of many Federation citizens. But with so many applicants and so few places, a strenuous selection process was put in place, resulting in the famous Starfleet Academy, located in San Francisco on Earth. Anyone wanting to join Starfleet, or serve on a prestigious ship, would undergo a rigorous academic, physical, and psychological training program.
The 24th century and beyond
Starfleet’s prestige grew to great heights during the 24th century. Starfleet captains were given an incredible amount of authority and, with it, responsibility. Exploring uncharted space often meant that a Starfleet captain would be the representative of the entire Federation to any newly-contacted peoples, and with starships capable of leveling entire worlds under their command, the expectations and obligations placed upon them were immense. A Starfleet captain was expected to not only serve as an amiable point of first contact for new worlds, but could also be embroiled in local affairs and would have to navigate them while adhering to Starfleet’s Prime Directive of non-interference.
The 24th century saw a number of devastating interstellar conflicts that tested Starfleet principles to their limits. First came the Borg, who reached Earth before being repelled by the crew of the Enterprise-D under Captain Jean-Luc Picard (The Next Generation). Then came the shapeshifting Changelings and the Dominion they ruled over, who initiated a war with the Federation and its neighbors that became catastrophic in its death toll. However, this era also saw the Federation’s first foray into the unexplored Delta Quadrant, in which Captain Kathryn Janeway and the crew of the USS Voyager deliberately stranded themselves in the distant region of space in order to protect an embattled alien world, and began a long journey home that saw them make first contact with countless species.
As of Star Trek: Picard, Starfleet’s ethos of exploration continues into the 25th century.