I always wondered, because helium gas is so lightweight, how did it get into the deposits like the ones that people tap? Is it formed underground, or was it trapped?
Helium (He) is formed by radioactive decay of uranium (U) and thorium (Th) to lead (Pb).
There's another name for the nucleus of a 4He atom: It's an alpha particle. Alpha decay is one of the pathways by which radioactive elements eventually decay into non-radioactive elements. For example, 238U decays to 234Th via alpha decay. There are three key isotopes that lead to the generation of helium: 238U, 235U, and 232Th. Each of these is a "primordial" radioactive isotope. they were present when the Earth formed, and their half-lives are sufficiently long so that a good fraction of that original content has not yet decayed.
So how much helium does the decay of these isotopes produce?
After the alpha decay, the parent nuclide suddenly has an excess of two electrons orbiting it. The alpha particle has a deficit of two electrons. The alpha particle quickly grabs those two excess electrons and becomes a helium atom.
Most of the helium deposits in the Earth are thought to be the result of alpha decay. For example, see Helium Facts: Where Helium is Found.