Build the Kreep Mine, then select "New Mine" from the menu it has. It will offer "Fast" or "Slow". I prefer "Slow" because that provides 5* as many Rare Earth elements when you mine.
You will start with a single machine on a square. All around it are 8 squares it can 'see', and a whole lot more you cannot. I tend to go with digging NE, NW, SE, or SW, and getting a star shape to make it esy to return to the starting square for recharging.
That is another thing you have to keep track of. Your little machine consumes 5 power each time it mines a square. One it starts mining a square, it will continue until the square is mined, and then the 5 pts of power are subtracted from the machine's battery.
For now, set it to "Fast", and practice. Dig out a few squares by tapping on them. You cannot tap on the blacked-out squares, so don't bother. When you select a square to dig towards, it will be marked red, and the machine will travel from one square to the next, in the order you tapped. Note that you cannot tell which square is first, second, aso, so I hope you can remember. If you run out of power and cannot figure out an easy way to get back to th recharge square, just go to the menu at the bottom, tap it, and swipe left to go back to the Moon colony. From tgere, select the Kreep Shaft again, and select "New Mine". You will start in a new mine, and can start mining again.
Practice with this until you think you can do a good job leaving the machine alone to mine (time passes on the Moon aand in the mine at the same rate), so when you have a good path underground you can go back to the Moon and take care of stuff. When you are underground, your facilities are stilling mining, harvesting, and the people are still breathing/eating/drinking/producing waste, so if you need steady input of water/oxygen/food, it is possible for your people to get into trouble.
But it is a basic little game, that lets you get a specific resource you will need later on.
Have fun