A sabbatical was an extended period of time off from one's career.
At some point before 2367, the parents of Willie and Jake Potts went on sabbatical, but arranged for their sons to remain on the USS Enterprise-D, contingent on the boys' promise to keep out of trouble. (TNG: "Brothers")
William T. Riker, who during an 2367 undercover mission on Malcor III as Rivas Jakara was taken to a hospital and discovered to have an alien physiology, lied to his doctors by explaining that his irregularities were the result of inherited genetic traits, which could have been explained by his doctor if she wasn't on a sabbatical. (TNG: "First Contact")
In 2369, after Jean-Luc Picard was turned into a child as the result of a transporter problem, Deanna Troi argued that some people would find it hard to accept a twelve-year old captain. After going over several alternatives to commanding a starship, Troi suggested that he take a sabbatical and focus on archaeology for a few years. (TNG: "Rascals")
A retreat was a type of religious sabbatical. In 2376, after The Doctor suggested that his character of Father Mulligan be given a bigger role in the Paris 042 holoprogram, Tom Paris suggested sending Mulligan off on "a retreat to a nearby monastery, where he takes a vow of silence and never speaks again." The Doctor rejected the idea, threatening to make Paris say Hail Marys until Saint Patrick's Day. (VOY: "Fair Haven")