The film opens with the Enterprise E on a testing mission. They get a message reporting a second Borg incursion, but are told to remain at their position on their current mission.
That's not entirely accurate. The Enterprise was on assignment when Captain Picard received word of the Borg invasion from Starfleet. The Enterprise was then diverted to the Neutral Zone in case the Romulans decided to take advantage of the situation. Fortunately, Picard knew that was complete bullshit.
As they enter real space after the travelling to the mid-21st century, they find the sphere attacking a point on the surface. They destroy the sphere, and beam an away team down to figure out what the Borg were attacking.
Actually, the crew figured out what The Borg were attacking before they even beamed down. They correlated the date with the location and figured "That must be where Zefram Cochrane is building his warp ship!"
The reason they beamed down was to make sure the ship wasn't damaged. Obviously it was, hence the rest of the storyline.
By the way, Star Trek: First Contact started the downward spiral for the Borg.