The game you're describing is Lemmings. You guide a stream of small creatures from an entrance to an exit, assigning different skills, like digging or building, so they can work their way through obstacles. It's a classic puzzle title, and the pickaxe-digging behavior you remember is one of its signature moves.