Ideas:
1. If it's multiple projectiles, have a defensive weapon that forces those projectiles to smash into each other.
2. Watch the end of the movie "The Beyond" on Netflix and use the "alien tech" at the end of the movie as an example--it's basically portable shielding.
3. If it's one large projectile, as others mention, an early warning system is best.
4. If the projectiles have stealth capability, this could ruin early warning systems.
5. A "thick/reinforced/shielded atmosphere" would probably destroy most small projectiles.
6. A "planet mover" technology could just move the whole planet out of the line of fire.
7. Consider the fact that a planet that has been hit by an asteroid would probably have very low value to the "captor".
8. Shielding moons. That is, a movable moon that can intercept projectiles.
9. If "warp bubble" technology exists, then bending spacetime around the asteroid could alter the course of a projectile... so much so that you could send it back to the civilization that threw it at you.
10. Similarly, if you could make thousands of small warp bubbles, you could fragment the projectile into much smaller shards, capable of much less damage.
11. Ionize it. At a few thousands degrees, it would turn into a lava-like substance and its structural capabilities would be greatly diminished. At a couple million degrees, it'd become plasma and hitting the atmosphere would make it look like northern lights.
12. Contact with antimatter will create a total annihilation (and a big boom).
13. Interfere with the opponent's guidance system.
14. Create a "solar atmosphere", where the entire solar system acts like an atmosphere and tears apart incoming projectiles. Think of "fluidic space" from Star Trek Voyager. The idea is that most things can't stop a 50 caliber bullet, but a lot of anything can (so, 20 phone books can stop a sniper round, but a single steel plate cannot).
15. Portable black holes or gravity control.
16. 898
Subspace barriers. If the projectile must move along a smooth patch of spacetime, any interruption in the fabric of spacetime would prevent that movement, like a speedboat hitting a sandy beach.
17. Super advanced civilization. Restore your planet from a backup. Physical matter reforms to its last known stable state, including auto-resurrection. The asteroid would be little more than a pebble thrown into a pond.
18. Friendly intervention. Friendly civilizations could help you monitor and mitigate asteroids. Using asteroids as a war tactical result in a multi-civilization counter-attack.
19. Jamming. If they use teleportation, jam it. Subspace transport. Jam it. Hyperspace. Jam it. Peanut butter. Jam it.
Words of warning:
1. Slow moving asteroid ideas are highly "played out".
2. Don't try using "solar powered" object movers, since solar power is lost at the square of the distance, meaning solar power is useless at significant distances from a star.
3. Ionic propulsion takes a very long time to get up to speed and eventually runs out of fuel.
4. Throwing asteroids at an enemy seems like the equivalent of rock throwing in a third world country. There are probably much better ways to fight an opponent. 898