Here's why:
* Mass: The more massive the objects, the stronger the gravitational pull. This is because gravity is directly proportional to the product of the masses.
* Distance: The farther apart the objects are, the weaker the gravitational pull. This is because gravity decreases with the square of the distance between the objects.
This relationship is described by Newton's Law of Universal Gravitation:
```
F = G * (m1 * m2) / r^2
```
Where:
* F is the force of gravity
* G is the gravitational constant
* m1 and m2 are the masses of the two objects
* r is the distance between their centers