In the realm of passive defense, there's been a lot of talk so far about thick armor, but you'd be better served to think about angled armor. If there's a small projectile coming at you at an absurdly high speed, don't try to stop it cold by absorbing its even-more-absurdly-large kinetic energy. It's likely going to be easier to deflect it by redirecting its momentum and sending it off into space while still traveling absurdly fast.
Which ties into the already-mentioned option of stealth, since (modern) anti-radar stealth designs also incorporate flat surfaces and hard angles, just like what you'd want for deflecting projectiles.
And then there are active defense options, which have gone largely unexplored in previous answers aside from making evasive maneuvers. But there are other options:
* If you have high-powered lasers available (and, if you're using a fusion reactor, you probably do), you can zap the incoming slug with them. 898
If the slug is small enough and your laser is powerful enough, you might be able to completely vaporize it. (This wouldn't make it completely disappear, but its mass would spread out over a much larger area, making it easier to absorb the impact. If you can vaporize it far enough away, much of the pass will miss you entirely.) If you don't have enough power for that, you can target the side of the projectile and the material boiling off the side will impart a slight lateral thrust, which may cause it to miss if you can target it accurately at a long enough range.
* If you have railguns of your own and they can fire quickly and accurately enough, they can also be used to intercept incoming projectiles. Whether lasers or railguns are better for point-defense fire is largely a matter of how the rest of your setting works and the flavor you want to give it.
* Use a cloud of robotic drone "plates" which can position and angle themselves to deflect the projectile while still at a distance from the ship, rather than waiting for it to reach you before attempting a deflection. In addition to the benefits of keeping the slug further away from you, such drones would also be able to adjust position and angle more quickly than the ship itself, as they would be smaller, lighter, and not constrained by the limits of human G-tolerance.
* Another option with drones would be to use them as reactive armor, self-destructing and using the power of their own detonation to slow, damage, and/or redirect the incoming projectile. 898