Predestination. Basically an event in the past happens to trigger an event in the future despite the fact that it hadn't happened yet.
In the episode they called it a Pogo Paradox.
DUCANE: The Pogo Paradox.
SEVEN: A causality loop in which interference to prevent an event actually triggers the same event.
DUCANE: Excellent. Can you give me an example?
SEVEN: The Borg once travelled back in time to stop Zefram Cochrane from breaking the warp barrier. They succeeded, but that in turn led the Starship Enterprise to intervene. They assisted Cochrane with the flight the Borg was trying to prevent. Causal loop complete.
DUCANE: So, in a way, the Federation owes its existence to the Borg.
SEVEN: You're welcome.
As Seven recalls those events the timeline was never altered really so that Borg incursion had always happened.