The gravitational force has a magnitude of
(Newton's law of universal gravitation),
where G is the gravitational constant, m1 and m2 are the masses of two objects and d is the distance between them (assume that the objects are small enough with respect to the distance).
If mass of one object is increased, the force is also increased. And force is proportional to each mass, i.e. if m1 increases, say, twice, then the force increases twice too.
If the distance increases, the force decreases. The force is inversely proportional to the square of the distance. This is much quicker, if the distance increases twice, the force decreases 4 times.