The Constitution class of starships includes the famous U.S.S. Enterprise, commanded by James T. Kirk in the original "Star Trek" TV series. It featured a crew of 430 personnel, with room for up to 900 people. The ship served a wide variety of functions, from exploration to military defense to scientific research. The Constitution vessels underwent an "upgrade" during the "Star Trek" movies, increasing their efficiency and explaining the slightly different look in the films.
The Galaxy class of vessels served as the Federation's flagships during the 24th century (the period covered by "Star Trek: The Next Generation" rather than the original series). The Enterprise-D, commanded by Jean-Luc Picard, was a Galaxy class ship: featured in almost every episode of "The Next Generation." According to Star Trek Intelligence, it is much larger than the Constitution class, with a crew of over 1,000 and room for 15,000 people. Like the Constitution class, it served as a workhorse vessel: able to undertake military, scientific, diplomatic and first contact missions.
The Intrepid class was a much smaller ship than either the Galaxy or Constitution class, with a crew of 230 and room for 3000 people, according to Star Trek Intelligence, an information resource website about the franchise. It was built with speed and maneuverability in mind, making it excellent for deep space exploration and scientific missions. The titular vessel in the "Voyager" TV series was an Intrepid class vessel.
Though technically an escort vessel, the Defiant class acted mainly as a flat-out warship, featuring high-end armor and bristling with weapons. It carried a small crew of 50, with room for up to 150. Starfleet built it in response to the threats from the Borg and the Dominion. It appeared on the TV show "Deep Space Nine," near a wormhole that represented the first line of Dominion incursions.
The Excelsior class was built as a replacement for the Constitution class, acting as Starfleet's flagship from the late 23rd century to the early 24th. It hosted a crew of 750, along with capacity for 9800 people in toto. Its signature ship, the U.S.S. Excelsior, made prominent appearances in the Star Trek movies and was eventually commanded by Captain Sulu in "Star Trek VI."
Miranda class vessels acted as support ships for the refitted Constitution class ships: smaller and less well armed, but excellent for day-to-day duties. They held a crew of 230, with maximum room for 500. The most prominent appearance of the class occurred in "Star Trek II," when the villainous Khan commandeered the Miranda-class U.S.S. Reliant for a sneak attack on Captain Kirk's U.S.S. Enterprise.