There is some discussion of this
already, but here is other information.
Gold can be found throughout the crust of
the earth and in the oceans, though the
concentrations are typically too low to be of
interest or value. Portions of the crust with
higher concentrations of gold are called
deposits, of which there are
four types Lode, Intrusive, Placer, and
These deposits are formed by two fundamental
processes (see first link and
here). The first two
involve magma transporting gold from within the
mantle to nearer the surface and result in gold
embedded within solid rock. The latter two are
more like piles of gold which collect after
deposits of the former two types are eroded.
Rivers transport the gold particles and
nuggets until they become caught somewhere,
gradually accumulating. Eventually the waterway
dries up and the collections remain as deposits.
The water of Earth's oceans contain vast amounts
of dissolved gold (
estimated at 20 million tons, compared to a
2017 global production of 3,200 tons), but
the concentrations are so low (
1 gram per 100 million tons of seawater)
that it is not economically feasible to extract.
Gold is also found throughout the universe.
This is believed to be due to the
formation and distribution of gold during
supernovae and merging of neutron stars.
This gold, in cosmic dust, then collects into the
various rocky bodies of the universe. While this
includes planets such as Earth, the gold present
during formation would have sunk to the core
(since gold has a relatively high density compared
to most elements in the crust.) The gold which can
actually be mined seems to have been delivered by
meteorite bombardment some time after
practical instructions on finding gold