Cave Corals are very small speleothems consisting of short stalks with bulbous ends. They are usually occurring in numbers forming patches.
They consist of Calcite and have concentric rings as you can see on the broken items on the image. This shows, that they are formed in a way similar to dripstones. Still they grow in all directions, ignoring gravitiy.
The way they are formed is still unknown. One theory says, that the reason why their diametre is small near the wall depends on the low temerature of the wall itself. The air, just a few millimeters from the wall, is a little bit warmer and so they can grow better which means thicker. The same argument works for underwater growth.
One theory says, they grow under water, during a period of time when the cave is filled with water. But normally calcite forms crystals, which are called dogtooth spars. So there must be a (maybe chemical) reason, why cave corals are formed instead.
Maybe the most probable theory ist, that they grow during a period of periodic changes in water level. Every time the corals get flooded for a longer time, a thin layer of calcite grows. Instead of a single crystal growing bigger and bigger, the crystal gets a skin of other calcite crystals every time it gets flooded. This results in the layered structure of cave corals.