There's an Asteroid Mining Module (I think that's what it's called) that you can research. These go on ships, or on space stations.
What I did was equip my asteroid mining ships with 1 hull space of cargo, then some Asteroid mining modules. Then, as a fleet, they move from asteroid to asteroid, carrying 1 or 2 mass throwers. When they arrive they unload the mass throwers and start mining automatically. After a 5-day cycle I set up the mass throwers to throw minerals at one of my worlds. Then you forget about them until the asteroid runs out of minerals.