Do you mean this?
The Underground (Japanese: ちかつうろ Underground Passage) is an area in Pokémon Diamond, Pearl, and Platinum found beneath the entire Sinnoh region. Players can travel underground at any time using an Explorer Kit, which they can receive from the Underground Man in Eterna City. The Underground features multiple uses of the DS's touch-screen, as the main view is on the lower touch-sensitive screen while the upper screen shows a radar map of the entire underground. It also utilizes DS Wireless Communication to allow multiple players, each with their own DS and copy of the game, to interact.
The Underground has a different menu from the one in the overworld. Mostly, it shows the different items used; with the exception of treasures, which can be transferred to the player's Bag, these are all exclusive to the area.
Spheres are the currency of the underground. The player can bury their spheres to make them more valuable, either by leaving a sphere buried for a long time to make it grow, or by burying spheres of the same color in the same spot to merge them into a larger sphere. When spheres are buried in the same spot, their sizes are mixed together. When two or more spheres are buried on top of each other, the largest sphere is added to the smaller spheres' sizes divided by five, rounded down, plus one. Spheres can reach a maximum size of 99, with some growing faster than others. Blue, green, and red spheres grow the fastest, and are thus the least valuable. Pale spheres are the second fastest growing spheres, and are semi-valuable. Prism spheres are the slowest growing spheres, and are thereby the most valuable of all the sphere types. Burying spheres can increase the number and density of mining sparkles in the same vicinity.
There are six different areas in the Underground; each is accessible from different overworld locations. While some are readily accessible from the mainland, players must sometimes travel to far-off places like Fullmoon Island to enter these areas.
The Underground is also where secret bases are created in the Generation IV games. The spheres dug up in the mining minigame can be traded to explorers found throughout the caves for objects to furnish secret bases. Secret bases can be created in any part of the wall using a Digger Drill. These bases can be decorated with ten items each.
If a player visits a secret base of another player, they can get that player's flag. After successfully returning the other player's flag to one's own base, the player's record is updated. The number of flags captured (either from the same "opponent" or several ones) upgrades the player's secret base computer. Each upgrade changes the graphic slightly (the icons resemble the evolution of personal computer technology) and also allows the player to remove additional boulders from their base using the "Store" option of the "Decorate" menu. This allows more room for decorations to be placed. Boulders that have been removed cannot be placed back into the base, although they'll reappear if a new base is created.
You can only dig in the underground in the sinnoh games. (Diamond, Pearl and Platinum)
So you can't dig there in the new B/W series. Maybe they will add this feature in X and Y. Who knows?