Large spacecraft in the Star Wars universe often have many repulsorlift engines

The deflectors are sensitive to the gravitational field generated by antigravity generators on the spaceship itself. It’s worth noting, though, that repulsorlift vehicles aren’t able to go through shields. This is clearly visible in the Naboo battle scenes. If a large ship with an active Planetary Shield attempts to enter an atmosphere, it will be unable to do so because of this.

So there you have it. Repulsorlift technology allows star destroyers to hover in the air. This technology, however, has limits in any fantasy reality. Star Destroyers are enormous and weighty vehicles.