Science Friday (2/3): Geodes are formed within cavities inside certain rocks under certain conditions. The crystal formation doesn't hollow out the rock.
True, gonads are sometimes called rocks.
And this is why sedimentary and igneous rocks are the most likely culprits. Igneous rock forms from cooling lava. While lava cools, it may contain bubbles of carbon dioxide (or other gases, too, I suppose). If the lava cools around the
bubble, then a cavity is formed within the rock. Another option is if the rock is forming underwater. In this case, the outside can cool quickly, leaving a hot, molten inside. The rock becomes brittle, and the inside leaks out, leaving a hollow rock.
In sedimentary rock, either the core is hollowed out by dissolving away, or some organic matter is trapped within, but decomposes and works its way out, leaving a cavity inside the rock.
The cavity fills with water and mineral deposits, which develop into crystals over time. The type of crystal varies by location, but can include silica, quartz, hematite, calcite, and pyrite (fool's gold).