At long range, any large platform like object in space can be easily detected and its trajectory plotted. At that point, all it takes is developing a track that will put a large, fast moving mass on a collision course and viola, no more space-station. Sure, you can shoot said object, but just what is the destructive power of a turbolaser? We don't know, canon never clarifies, and at some point you can probably find a larger space rock than the station can destroy it (especially if we accept the ridiculous canon effective range of 150km for turbolasers).
Well what a bout shields? But said above point still applies, and you can probably do some hard math to figure out just how large (and fast moving) your rock needs to be to both withstand enough incoming fire and retain enough mass and velocity to obliterate said space station. Once you start getting into relativistic velocities, you don't need a lot of mass.
Well how about I just give it engines and make it mobile?
Congratulations you just made a warship.
Dirtside things are handled the same way. Throw rocks (or turbolasers or whatever) until it breaks. Obviously, this assumes you have space superiority, which if your enemy is relying on static defenses should be straightforward.
TL;DR mobility is king.
(Note: This is a vast oversimplification of the difficulties inherent to projecting power and bringing force to bear where needed, especially in a distant location far from a base of support. The Battle of Hoth makes a fairly respectable effort to justify both the ground battle and subsequent actions by both sides given the vaguely sci-fi nature of the setting. No other scene is quite as well thought out, but it doesn't excuse the Empire from not having the Executor just park in orbit and obliterate the planet.)