Gravity is an attractive force that works to pull objects together. If 2 objects are close the gravitational pull will be stronger
Mass and distance determine gravity. The farther two things are away from each other, the weaker the gravitational forces are, the less mass an object has the less gravitational force it exerts