Caves are the natural underground chamber on a hillside or cliff. In areas where there are alternating beds of rocks (shales, sandstones, quartzites) with limestones or dolomites in between or in areas where limestones are dense, massive and occurring as thick beds, cave formation is prominent. Water percolates down either through the materials or through cracks and joints and moves horizontally along bedding planes. It is along these bedding planes that the limestone dissolves and long and narrow to wide gaps called caves result. There can be a maze of caves at different elevations depending upon the limestone beds and intervening rocks.
But most caves form in karst, a type of landscape made of limestone, dolomite, and gypsum rocks that gradually dissolve in the presence of water with a slightly acidic tinge. Caves usually have an opening through which cave streams are discharged. Caves having openings at both the ends are called tunnels.