Throughout ST:TNG and before Star Trek Nemesis, it's mentioned in passing that Riker and Troi were together for a while, then they broke up for some reason.
Is it ever mentioned what happened between the two of them? Was it mentioned in TNG?
If you're asking what happened in the past, it's covered here.
Deanna had an intimately close relationship with Will Riker, occassionally referring to him as imzadi, a Betazoid word for "beloved". Before they served together on the Enterprise-D, Troi taught Riker how to read her thoughts when she telepathically projected them. They learned each other's abilities but couldn't say "goodbye" when they parted.
Most of the information about the relationship comes from Episode Second Chances, where the Enterprise returns to the planet where Riker was saving a science station crew 8 years ago right before his breakup with Troi, and there they find a duplicate Riker (created due to a transporter accident) who spent the last 8 years on the planet.
The last time they saw each other, according to this Riker's memory, was on Betazed - the day before he started his tour on the Potemkin. Riker recalls that they were going to meet on Risa six weeks later. Troi interrupts him and tells him that they never did meet up in Risa. She tells him that he earned a promotion very quickly and chose to make his career a priority. There wasn't much time for anything else. They kept in touch, says Troi, but they didn't see each other again until they were both posted on the Enterprise two years later.
During TNG they flirted but maintained mostly professional relationship (mostly, at Riker's idea). There were a number of episodes when she flirted with him or tried to be alone (see Memory Alpha link above).
After Troi was assigned to the Enterprise-D in 2364, she was reunited with Riker. Although they informed Captain Picard that they already knew each other, neither Riker nor Troi initially revealed the intimate nature of their former relationship. Troi seemed fairly eager to be alone with Riker and, while at Deneb IV's mysterious Farpoint station, she suggested that they explore the passages below the station together, an idea that Riker refused. Before he later endangered his own life to investigate why a spaceborne entity believed to be a ship was attacking Deneb IV, Troi expressed, in an outburst of emotion, her extreme fear that Riker could be hurt. She soon managed to resume her former sense of calm, however, and returned to the Enterprise as Riker had ordered. (TNG: "Encounter at Farpoint")
They re-kindled their romance in ST: Insurrection movie under the influence of rejuvenating metaphasic radiation.
In 2379, Deanna married Will Riker. The first ceremony was a traditional Earth wedding, where Captain Picard served as Will's best man. After that ceremony, a traditional Betazoid wedding ceremony was to take place on Betazed. However the Enterprise-E's journey to Betazed was interrupted by the discovery of B-4. (Star Trek Nemesis)
The timeline as provided in Memory Alpha (though not attributed to episodes) was:
Taking my own advice, from the Memory Alpha page about Thomas Riker - Simply, Will Riker prioritized his career over his personal life:
During the time he spent on the planet, Thomas had remained deeply in love with Deanna Troi, his girlfriend at the time. Thomas had planned to meet Deanna on Risa the year of the transporter mishap, a fact upon which he had dwelt while stranded. In contrast, the Riker that beamed off-planet eight years prior was soon promoted and made his career a priority over their relationship, and never made the trip to Risa with Deanna.
If anyone wants to explore the full history between Riker and Troi, it is explained in depth in the Star Trek book Imzadi by Peter David. It explains anything you would want to know about them before they served on the Enterprise. The audio book narrated by Jonathan Frakes is very good and worth listening to even if you are not looking for answers.