Gravity is one of the fundamental forces of the universe, and it keeps us on Earth because it is relentlessly attractive. Every massive particle exhibits gravity by pulling closer to every other particle. The strength of this interaction is dependent on two quantities: the amount of mass and the distance between objects. It is possible to escape Earth's gravity if you have enough energy to speed up sufficiently.
The physicists Isaac Newton and Albert Einstein are most responsible for the modern interpretation of gravity. The Newtonian description came about when Newton realized that the same force that causes objects to return to the ground when thrown on Earth, keeps the moon in orbit. The more massive the object, the more gravity it commands. The Earth is much larger than we are, so its gravity dominates our interaction.
Albert Einstein extended the knowledge of gravity further, with his realization that energy matters just as much as mass, and that gravity is the curvature of space-time. The benefit of Einstein's work on gravity is that it explains how gravity works to shape the entire cosmos, whereas Newton's was only able to explain how gravity works for Earth. Newton described gravity as a force, whereas Einstein described it in terms of geometry.