(covers information from several alternate timelines)
A predestination paradox, or time loop, is a phenomenon in which an event of time travel can become part of events which have already occurred, and can even lead to the initial event of time travel in the first place.
In 2268, after having traveled back in time from 2373, Doctor Julian Bashir speculated that the events in which he was participating constituted a predestination paradox when he met USS Enterprise crewmember Lieutenant Watley. Realizing that his great-grandmother's name was Watley, and that nobody ever met his great-grandfather, Bashir began to suspect that he was destined to fall in love with Watley and become his own ancestor. Bashir's suspicions were later proven incorrect, however, in that he did not pursue a relationship with her, a decision which had no effect on the timeline. (DS9: "Trials and Tribble-ations")
In 1968, the crew of the Enterprise, who had traveled back in time from 2268 to perform historical research, encountered a Human named Gary Seven, who was attempting to sabotage a nuclear warhead platform. Fearing that Seven was an alien from the future attempting to manipulate the timeline, the Enterprise crew attempted to stop him, but Seven was eventually able to convince them that he was indigenous to the 20th century, and that he was in the employ of a benevolent race of aliens attempting to protect Earth. Later, upon checking their historical records, Commander Spock discovered that the crew of the Enterprise was, in fact, always a part of this series of events, and that, by interfering, they were simply fulfilling their role in history. (TOS: "Assignment: Earth")
On several occasions Captain Jean-Luc Picard attempted to avoid a predestination paradox from forming by ordering the USS Enterprise-D to stay on the course it was set on, fearing that changing course to avoid a time loop may be the very thing that got the ship stuck to the loop in the first place. (TNG: "Time Squared", "Cause and Effect")
In another predestination paradox, two time traveling Vorgon thieves from the 27th century arrived back in time to 2366 to obtain the Tox Uthat from Captain Picard who was known to have discovered and destroyed the device on his holiday on Risa. Their attempt to obtain the device was in the end the reason why Picard destroyed the Uthat, so that it would not fall into the Vorgons hands, thus completing the paradox. (TNG: "Captain's Holiday")
A predestination paradox occurred on Earth in the year 1893, when Enterprise-D crewmember Lieutenant Commander Data, who had traveled back in time from 2368, became trapped in a temporal vortex and had his body separated from his head, which remained in a cavern under the Presidio in San Francisco until 2368. In that year, Data's head was discovered, leading the crew of the Enterprise to mount an investigation. This investigation led to the very time travel event which transported Data back in time in the first place, thereby completing the time loop. (TNG: "Time's Arrow", "Time's Arrow, Part II")
Captain Braxton, a Starfleet officer from the 29th century, described this type of paradox as "A leads to B leads to C leads to A," when attempting to explain the series of events which led to the destruction of Earth's solar system in his time to the crew of the USS Voyager. Finding debris from Voyager in the aftermath of the temporal explosion which destroyed the solar system, Braxton came to believe that Voyager was somehow responsible for the incident. In an attempt to change history and prevent the explosion, Braxton traveled back in time to 2373 to destroy Voyager. This action led to both ships being transported back to 20th century Earth, where Braxton's timeship was appropriated by an unscrupulous industrialist named Henry Starling. It was at this point that Braxton realized that it would be Starling who would cause the explosion, by taking the timeship to the 29th century without properly recalibrating its temporal matrix. This time loop was eventually broken when the crew of Voyager was able to destroy the timeship moments before it traveled to the future. (VOY: "Future's End", "Future's End, Part II")