Welcome to Star Trek Answers. What would you like to know?

Roberto Orci, who co-wrote the movie and is a huge Trekkie, has suggested that 24th-century vessels, particularly the Jellyfish, were able to (in a manner of speaking) skirt the event horizon of the black hole. Instead of falling into the singularity and being destroyed, they struck the black hole at an odd fourth-dimensional angle and instead bounced backward in time--sort of like when you skip a rock across a river, it hits at just the right angle so that, instead of sinking, it goes somewhere else. That's only an analogy, but I hope it gets the idea across.

However, there's nothing in modern science to suggest that this would be possible. Most fans I've talked to are trying an alternate explanation: black holes formed by red matter explosions are "special." They're not normal black holes, and they have weird effects like causing time travel. This would also explain the strange appearance, shape, and visible size of the black holes in the movie, so I personally prefer this explanation. Take your pick.