Caves can form several different ways and can be found in many different environments around the world. Although many caves possess unique features, all caves are classified based on how they are formed.
Some caves are the result of lava flowing as the lava around it cools. This type of cave is often referred to as a Lava Tube and tends to be fairly small.
Another form of caves known as Sea Caves are formed by waves hitting the rock lining of the ocean or a large lake. These caves also tend to be small, and are very easily identifiable.
The most common form of cave, however, is the Solution Cave. Solution caves are formed by groundwater slowly moving through carbonate and sulfate rocks. The rock slowly dissolves, leading to irregular tunnels and caverns. This is made possible by the carbon dioxide absorbed by rainwater as it passes through the atmosphere, forming a weak carbonic acid solution (H2CO3). This acid then dissolves the calcite, the main mineral in limestone, which is then carried away in the underground drainage system. Mammoth Cave is a solution cave, and an example of the immense passages which can be formed through this process.