Nature of the Post
Deanna Troi held the post of Counselor on the Enterprise-D. Her primary duty was apparently to advise the Captain on matters of crew morale and use her psychology skills to assist in any negotiations that occurred. As a half-Betazoid, her empathic abilities gave her an advantage in such negotiations, but not all Starfleet Counselors have telepathic abilities: Ezri Dax, for example, has no such abilities, but she still served as counselor for DS9.
Deanna also acted as a regular psychological counselor, seeing various members of the ship's crew by appointment to discuss issues affecting their lives and performance. This aspect of the job is presumably common to all Starfleet counselors.
Why Starfleet made a Counselor a bridge crew member on Federation starships is something of a mystery; Counselor Troi started the job without qualifications for any bridge position (navigation, ops, tactical, etc.); her training in psychology was her only job skill. Critics of TNG have occasionally wondered if the Counselor on a Federation starship is a kind of "political officer" tasked with monitoring the activities of the command staff and reporting them back to Starfleet headquarters.