A cave is a natural hollow in a rock caused by the wearing away of the rock. Most caves are by the coast and are worn away by the action of waves. Waves loosen softer bands of rock and carry them away. Caves are often the shape of the softer rocks.
But caves in limestone are worn away by streams. Water dissolves limestone rock, and caves and tunnels form underground as a result.