* Igneous rocks form from the cooling and solidification of magma (molten rock) or lava. Gold is often found in igneous rocks because it's present in the Earth's mantle, where magma originates. As magma cools, gold crystals can form within the solidifying rock.
* Metamorphic rocks form when existing rocks are transformed by heat, pressure, or chemical reactions. While gold can be found in metamorphic rocks, it doesn't originate from the metamorphic process itself. The gold was likely present in the original igneous or sedimentary rock that was metamorphosed.
* Sedimentary rocks form from the accumulation and cementation of sediments, like sand, silt, or clay. Gold can be found in sedimentary rocks, but it's typically transported there by erosion from other sources, often igneous or metamorphic rocks.
Therefore, while gold can be found in all three rock types, it's primarily an igneous mineral.