They will need some training but they are appointed by a warrant, in America, by the President. They are between Officers and Enlisted and indeed do specialized jobs usually. They are not very common anymore as skills in the branches are a lot more varied. This is why the Air Force did away with them entirely. The others keep them I think out of tradition more.
As for Starfleet, I would guess similar unless otherwise noted.