The original series used three different colors of uniform to denote each division of Starfleet: yellow for command, blue for science, and red for engineering and security. The Starfleet logo was affixed to the left breast, and markings on the sleeves denoted rank.
From "Star Trek II" through "Star Trek: Generations," Starfleet adopted a single red jacket with black pants. Divisions were noted by a specific-colored turtleneck beneath the jacket, and insignia was displayed on both the right shoulder and left sleeve.
"The Next Generation" used a series of multi-colored jumpsuits closer to the original series than the movies. Uniform colors denoted branches (red for command, yellow for operations, blue for science), and insignia for rank was worn on the collar.
As the "Next Generation" canon grew, uniforms were altered to largely black outfits (later with a gray top). Division colors were noted by a shirt beneath the top, visible on the collar and upper chest.
Star Trek has a number of other uniform designs, from the tan, white and blue outfits seen in "The Motion Picture" to the navy blue designs in "Enterprise." They've also played with variants of existing designs, notably in the famous original series episode "Mirror, Mirror."