A geode is formed in solid rock where where there is an opening or cracks in the rock. Over time saturated solutions of dissolved minerals seep into the spaces in the rocks and formed crystals. Then due to weathering of rocks by wind, water, and ice the rock above the geode is eroded away. Finally after a long period of time the geode is found on the surface of the ground. More later.