The limestone that makes up the Waitomo Glowworm Caves was formed about 30 million years ago when the region was beneath the sea. The limestone is a fossil rock that is made up of the shells and skeletons of dead marine animals. The shells and skeletons of millions of dead marine animals were broken down by the sea into tiny particles which slowly rested on the seabed. Over time, layer upon layer of these particles piled up on the sea floor and compacted, forming limestone. In some areas of Waitomo, the limestone is over 200 meters thick.
Magma within the earths mantle was heated near the core. This made the magma less dense and so it rose nearer to the earths crust. As it moved along the crust, friction caused the plates to move. These convection currents beneath the earths surface forced the Australian plate to collide with the Pacific plate. Along this plate boundary, the pacific plate was being subducted underneath the Australian plate- which held the North Island of New Zealand. This made the Australian plate near the boundary buckle and bend as it pressed up against the Pacific plate. The limestone that was formed on the seabed was then forced up and out of the water.
These forces also caused the limestone to buckle and bend, creating cracks and weak spots in the rock. This allowed water to flow through the limestone and to wear away at he rock. Small amounts of CO2 dissolved in the rainwater made it slightly acidic (pH 6 approximately). This reacted with the limestone (which is primarily made of Calcium Carbonate) and slowly dissolved it. This erosion of the rock created the channels, caverns and caves that are seen today.
Once the caves were formed, stalactites, stalagmites and other cave decorations began to form. water dripping down form the roof of the cave or flowing over the walls left behind mall deposits of Calcium