Drones will sit in your SpacePort until they detect an incoming attack, then they will launch and destroy the attacker. They will stop virtually all ship based attacks, whether they be Bombers (or Seekers), Scows filled with waste, or Scanners attempting to snap a photo of your planet surface.
Drones last for one use. Therefore you should keep several around, perhaps even a lot more than several, and replenish them when they are spent. You wil need to keep your SpacePort level high enough to house each drone as well.
See also ship to ship combat.
Playing Note: This ship is particularly loved for defense because even with relatively low level shipyards this ship can be built both cheaply and quickly. This makes this a staple ship when having to rush build a defense against an incoming attack. A Spaceport full of Drones also provides a much greater defense for a single planet than a SAW.