You can mine at a planet or asteroid a maximum of two times. Once when you land, and once before you leave.
planets vs asteroids
Planets and asteroids each have their own resources to mine from. The playmat shows what can be mined and where to get it.
Whenever you land on a planet or asteroid, you will automatically have mining rights. In order for someone else to mine at that location at the same time, you must battle for mining rights.