Answer: increases with the masses of the bodies, but decreases with the square of the distances between them.
According to Newton's law of Gravitation, the force
exerted between two bodies or objects of masses
and
and separated by a distance
is equal to the product of their masses divided by the square of the distance:

Where
is the gravitational constant.
As we can see, this force is directly proportional to the product of the masses and inversely proportional to the square of the distance between them.
This means that the gravity force decreases when the distance between these two bodies increases, and increases when the masses of the bodies increases.