The Creation of a Cave Cave formation begins when rainwater absorbs carbon dioxide as it falls through the atmosphere. Rain water must have carbon dioxide to become acidic. It must be acidic to chemically react to the limestone bedrock.
Rainwater is absorbed by the soil into the ground.
As rainwater comes through the soil it absorbs more carbon dioxide that is being produced by plants that are dead. As it travels down through the ground it comes to solid rock. When the rock is limestone or dolomite caves can form. The water reacts chemically with limestone and slowly a larger and larger space will form. This is what you call chemical erosion.