Asteroid mining is pretty difficult. Make sure you bring your ship to a full stop near an asteroid before going out to mine. Once you leave your ship, you can move around in space and reach resources. You can check the controls for moving on this page.