The Black Hills are a great dome of igneous and metamorphic rocks rising from the Great Plains. This ancient core---the park's oldest rocks, schists and pegmatites, are Precambrian, over a billion years old---was revealed after the uplift of the Hills some 70 million years ago, when weathering and erosion began stripping away younger sedimentary layers.
Those layers, which form most of the park's foundation, derive from shallow inland seas that periodically inundated the region from 600 to 60 million years ago. Sediments that accumulated some 350 million years ago became Pahasapa limestone (from the Lakota name for the Black Hills) within which the modern cave systems formed.
An early cave network formed in the limestone layer as far back as 320 million years ago: Sulfur-based acids derived from gypsum (a calcium-sulfate mineral laid down by the seawaters) embedded in the limestone began infiltrating the cracked and fissured rock.
The rise of the Black Hills and the retreat of the inland sea probably accelerated the Wind Cave excavation. Rainwater laced with carbon dioxide---accumulated from decaying plants---dissolved the limestone.
Hikers can take in the physiographic context on the terrestrial trails; Rankin Ridge, for example, provides a Black Hills prospect from a fire tower. Explore the Wind Cave formations---from lacy boxwork to drapery and dogtooth spar---on one of several guided subterranean tours.