Once the asteroids are spotted and their orbits determined, an earthbound asteroid can be nudged slightly off course with a satellite deflector or a high velocity projectile, or blown up with nuclear weapons, causing it to miss its deadly rendezvous.
Source: tatoeba (11234657)