You first click "place" and then you can put it anywhere on the lot as long as it's an open space. Then I think the option is "dig" and your sim will go over to it and start drilling into the ground. It will take them several sim hours to dig, and along the way they will find stuff that goes into your inventory, eventually you will get the message that they've gone as far as they can. Then you pick up the miner, and if you want you can jump in the hole. Sometimes you'll get a glowing hole, and your sim will go on an adventure down there.