The earth orbits the sun, and the moon orbits earth, each pulled inward by the gravitational attraction of the other body.
Gravity depends on mass and on distance. The sun is a long way from earth, but is massive. The moon is smaller but closer.
gravity video last updated 2026-11-17 visit oceantide.io