Step-by-step explanation:
According to Newton.
There is a force known as gravity which causes attraction of bodies. The force is inversely proportional distance squared between the bodies i.e., the force increases as the distance decreases. This force is also directly proportional to the product of the masses of the bodies i.e., the force increases as the masses of the bodies increase.

G = Gravitational constant = 6.67408 × 10⁻¹¹ m³/kg s²
m₁ = Mass of object 1
m₂ = Mass of object 2
r = Distance between them