Geodes are defined by their cavity which is lined with crystals. Geodes are formed over millions or even hundreds of millions of years. Geodes usually form in one of two environments - either volcanic or sedimentary. In volcanic systems, hollow cavities tend to be filled with supersaturated fluids rich in silica. These usually for quartz geodes.
Sedimentary geodes are usually more diverse in mineral content.
Geodes form crystals from the outside to the inside. Therefore, the crystals nearest the center are the last to form. The crystalline material is usually harder than the host rock. Over time, the host rock erodes leaving behind the geodes. Typical minerals found in geodes include quartz and chalcedony, calcite, and selenite.