Limestone is a composite of calcite and dolomite. The chemical formula of calcite is CaCO3. Geologists can use an acid such as HCl for the following reaction.
CaCO3 + 2H(+) + 2Cl(-) ⇒ Ca(2+) + 2Cl(-) + H2CO3
The H2CO3, however, immediately decomposes into H2O and CO2, so by determining that gas is being emitted, aka it is bubbling, they can determine that it is limestone.