The collision was a technology demonstration, and an experiment to assess the capabilities to do such maneouvers in future should a need arise.
It is the kind of stuff sci-fi movies and science fiction are made of. An asteroid hurtling towards the earth, its collision having the potential to wipe out all life forms. And human beings (mostly United States as a country) manage to execute a last-minute plan to deflect the asteroid from its trajectory and avoid the collision.
On Tuesday morning (04:46 am India time), NASA, for the first time, enacted this script in real life. Just that the asteroid in question was not headed towards the earth, and there was no danger of any collision. What NASA managed to do was to let one of its spacecraft, sent specially for this purpose last year, crash itself against a small asteroid that was orbiting the Sun 11 million km away from Earth. By doing so, it hopes to change the orbit of the asteroid. How much it succeeded in its effort would become known only after measurements are done.