Start by sending out your child Spectrobe to search. When you see flashing stars appear on the ground, click one of them to begin an excavation.
Once you're in, use the stylus to click or rub at the dirt and clear it away. The thing to watch is pressure: if you hit the fossil, mineral or cube inside too many times, you'll damage it and fail the dig. Slow and light beats fast and enthusiastic.