Gravity depends on mass. The mass is the weight of an object, how much of weight it contains. The more mass the more gravity is applied an vice-versa.
The strenght of the gravitational force depends on distance. If something is far, it'll be less influenced by the force and viceversa.
Hope it helped,
BioTeacher101