Earth-Body Equipotential = Grounding
When conductors at different electric potentials make contact, charge moves until the entire connected system reaches a single potential. The Earth functions as an enormous reference conductor with effectively infinite capacitance, so its potential remains stable as smaller bodies equalize to it.
The human body is conductive enough that this same physics applies. Direct contact with the Earth allows charge redistribution until the body rests at the Earth’s potential. This is grounding: classical electrostatics and a simple example of charge equalization.