Gravity is the force by which a planet or other body draws objects toward its center.
The force of gravity keeps all of the planets in orbit around the sun.
Anything that has mass also has gravity. Objects with more mass have more gravity. Gravity also gets weaker with distance. So, the closer objects are to each other, the stronger their gravitational pull is.
Earth's gravity comes from all its mass.
All its mass makes a combined gravitational pull on all the mass in an object in its gravitational area.
This gravitational pull causes an object to come back to earth if we throw it up in the air.
We experience weight because for the same reason. And if we were on a planet with less mass than Earth, we would weigh less than we do on earth. That's the reason why our weight on the moon becomes 1/6th of our weight on earth.
The planets revolve around the sun because of the gravitational force between the sun and the planet.