From Bravo Fleet Infobase
"A Captain's Yeoman is the hardest working member of her staff. He has to know everything she knows, keep her schedule and wrangle officers with twice his seniority for little or no appreciation from anyone but her." - Genevieve Russell, Captain, USS Galahad.
The Yeoman is a position in the Command Department which serves as a personal assistant to the Commanding Officer. While not every ship carries a Yeoman, Captains who have been authorized to do so by Starfleet Command may select an Ensign (or other young officer, such a Cadet or Lieutenant JG) to serve as their personal adjutant and assistant. The position involves a backbreaking level of paperwork and close-quarters personal contact with a senior officer who will be constantly evaluating the young officer's performance, but the yeoman gains two things in exchange which make the position highly sought after. First, they gain the notice and, if they perform well, the personal recommendation of a senior Starfleet Captain who will likely go on to groom them for an eventual command of their own. Secondly, and possibly even more importantly, they gain immediate and practical experience in the day to day business of commanding a starship. This gives them a considerable advantage over their peers, and can lead to suitably rapid promotion if their ability turns out to match their Captain's opinion of their potential.
It is generally understood under Starfleet protocol that a Yeoman speaks with the Captain's voice - presumably, they know the Captain's mind better than anyone outside the senior department heads or the executive officer. Wise Yeomen take this to mean that they'd best keep their mouth shut unless they're very, very sure they do know the Captain's mind.