At the start of Star Trek: First Contact, the Enterprise follows a Borg sphere into the past to stop them from changing history - preventing first contact with the Vulcans and assimilating Earth. It is made clear that the Enterprise itself does not possess the technology to travel through time and with this in mind it is unlikely that the people of Earth from a time pre-dating the Federation had time travel capabilities either.
At the end of the movie, once first contact has been made, how did the Enterprise return to their own timeline?