This is done with a mining laser. To mine, the player needs a ship that has a mining laser equipped. If there is none, they can use the drone, as it has two mining lasers equipped. To extract the resources the player has to shoot the object with his laser. As seen in the above image, parts of the asteroid will become destroyed to drop the resource. Loot will then appear, ready to be collected.
When the resources of an asteroid are depleted, it can not be mined any longer. Some asteroids contain larger amounts of resources. They are noticeable even at some distance, and it may be more profitable to search for these asteroids in each sector than it is to mine standard asteroids.