You can destroy unwanted structures and ships. Below the picture icon on the HUD (The large box in the bottom center of the screen), there's a button that allows you to scuttle a selected structure or ship. Select the unwanted unit, then press scuttle. After a certain amount of time, the unit will be destroyed and you will recieve a fraction of the resources you used to build this unit back. If you want to end a scuttle, press the button a second time.