A temporal rift is a tear in spacetime and an extremely dangerous temporal anomaly. Encounters with temporal rifts usually end with the vessel making contact with the rift being transported to a different time and space.
Yhe USS Bozeman encountered a rift which exploring the Typhon Expanse. The rift sent the ship ninety years into the future, to the year 2368. The Bozeman exited the rift on a collision course with the USS Enterprise-D, which caused a temporal causality loop when they collided. (TNG: "Cause and Effect")
- In fact, the rift was created by a battle between the Romulans and the USS Enterprise-C in 2344 at the Narendra system. The Enterprise-C emerged from the rift, creating an alternate timeline in which the Federation and Klingons were still at war. The rift was collapsed by sending the Enterprise-C back through, restoring the timeline. (TNG: "Yesterday's Enterprise")
29th century Starfleet vessels could travel through time by creating artificial temporal rifts. One such ship, the Aeon did this to travel to 2373 in an attempt to destroy the USS Voyager. The rift destabilised, sending both Voyager and the Aeon back to the 20th century. (VOY: "Future's End", "Future's End, Part II")
Also in 2373, an away team from the USS Cantabrian, aboard a shuttlecraft, was hit by a temporal displacement wave (which, in turn, created a temporal rift), travelling back in time. After gaining assistance from the USS Cantabrian's captain Thekla Lawless, the team found the temporal wave and returned to their own time. (Star Trek: The Cantabrian Expeditions: "The Fire In Which We Burn")
In an alternate timeline's year 2404, Admiral Kathryn Janeway created a temporal rift to travel back in time to help the Voyager return home 16 years earlier than in her timeline. The plan worked, with Voyager returning from the Delta Quadrant in 2378 instead of 2394 in the original timeline. (VOY: "Endgame")