Troi was ship's counselor on the USS Enterprise-D (NCC-1701-D) and also subsequently on the USS Enterprise-E (NCC-1701-E).
She was born on March 29, 2336 near Lake El-Nar, Betazed, to parents Betazoid Ambassador Lwaxana Troi (a Betazoid) and the late Starfleet Lt. Ian Andrew Troi (a human). Because she's half Betazoid she's an empath, which often comes in useful when dealing with hostile aliens, though often she fails to detect intelligence in creatures with "a different plane of intelligence" until it's too late.
In 2364 she joined as a lieutenant commander on the USS Enterprise D and in 2370 was promoted to commander.
In 2372 (after she crash-landed the Enterprise D) she was transferred to the USS Enterprise E (NCC-1701-E).
In 2379 (after an on-again/off-again relationship which solidified in Star Trek: Insurrection), Deanna Troi married Commander William Riker and transferred to the U.S.S. Titan with her husband (who was promoted to Captain and assumed command of the vessel). (Events depicted in Star Trek: Nemesis)