You'd be hardpressed to find a space scientist who didn't shake his or her head during Armageddon, the 1998 flick riddled with leaps of logic that somehow amounted to sending Bruce Willis and a crew of other "astronauts" to nuke an asteroid headed to Earth. The basic problem with sending a nuclear bomb to destroy an asteroid, say researchers, is that it would require a device capable of exploding with at least four times the force of anything we have here on Earth. "In Armageddon, given the size of the asteroid involved, they'd need a nuke that could detonate with the same energy output as the sun," said Phil Plait, who runs the popular space blog Bad Astronomy. "I'm rather glad we don't have a weapon like that."
How, then, would we deal with a wayward space rock hurtling its way towards our delicate little planet? After all, an asteroid roughly 10 kilometers across basically wiped out all the dinosaurs 65 million years ago, and just one rock 100 meters across would rattle Earth with the explosive power of a dozen or so nuclear bombs. Not good.
The first important step would simply be to keep track of where the asteroids are. "It's crucial we find them," says Marcus Chown at New Scientist, "before they find us." Near-Earth objects (NEOs, for short) are objects that orbit the sun nearer than 1.3 times the Earth's orbital distance. In 2012 alone, roughly 8,800 NEOs have been logged. NASA already keeps close tabs on these potential H-bombs, and websites like Asterank even beautifully map the 580,000 known asteroids throughout our solar system in three dimensions.
Now suppose an asteroid really is headed for us. Since we can't really blow it up, says Plait in a TEDTalk, we'll need to knock any hazardous NEOs off course. This can theoretically be achieved by sending a space probe directly at a killer asteroid at full speed; the force of the impact, if we hit it, should be just enough to change its trajectory and make it miss Earth.
And just in case that same pesky asteroid circles back around the sun, we send a second probe hitchhiking behind the impactor for extra insurance. This probe wouldn't crash into it again. Rather, it would move to a "station-keeping position" near the space rock, "using its own gravity to very gently tug the rock into a safe orbit." No messy nuclear explosion necessary.
So as long as we keep a sharp eye on our solar system, we should be okay, concludes Plait.
[W]e're clever animals, us humans, smarter than the dinosaurs ever were. We are just waking up to the dangers in the sky, and I think we're intelligent enough to recognize the threat and take it seriously. We've already begun taking steps in that direction. It will take time, and lots of expertise, and of course a lot of money. But that'll be a pittance compared to the cost of doing nothing.