The bigger something is, the stronger its pull. So the Earth, which is huge, has a strong pull that keeps us on the ground. The Sun is even bigger, so it pulls on the Earth, keeping us in orbit around it.
Gravity is a force that makes everything in the universe want to get closer to each other. It's what makes things fall, what keeps the planets in orbit, and even what keeps galaxies together!