Calcite, the mineral that makes up limestone, dissolves slowly in rainwater. Over time, this process can form caves. For this reason the Rock of Gibraltar contains over 100 caves. St. Michael's Cave, located halfway up the western slope of the Rock, is the most prominent and is a popular tourist attraction.