What about them?
It depends on the time period; they changed several times.
During the time of TOS, red was for operations and security, gold was for command, and blue was for science and medical.
Starfleet had a uniform that didn't last very long during the events of The Motion Picture, mostly white or beige, with color-coded badges:
- White – command division
- Orange – sciences division, scientific research and technical branches
- Green – sciences division, medical branch
- Red – operations division, engineering and maintenance branches
- Gold – operations division (communications branch), command division (helm and navigation branches)
- Grey – operations division, security and services branches
From the 2270s to the 2350s, everyone wore a red over-jacket, with white shoulders for enlisted personnel, and a sweater underneath that was color coded similar to the uniform badges used just prior. The sweater was abandoned sometime in the early 24th century.
Uniforms from the 2350s onward had red for command, gold for ops and security, blue/teal for science and medcial.
A future uniform from the 29th century was seen in Future Tense and Relativity: black with color on one shoulder and sleeve. Blue for command, brown for ops, grey for science.
I prefer the explanation from DS9 episode "trials and tribble-ations":
"Wait a minute, aren't you two wearing the wrong color?"
"Don't you know anything about this period in time?"
"I'm a doctor, not an historian!"
"In the old days, operations officers wore red, command officers wore gold..."
"...and the women wore less."
"I think I'm going to like history."
- - Bashir, O'Brien, Sisko, and Dax, clad in TOS-era uniforms