The simple fact of having mass causes objects to attract each other. In some cases, you can consider to be constant the gravitational force that a planet exerts on objects. However, for the celestial bodies, such as the Earth-Sun system, it is necessary to use the Law of Universal Gravitation.
Considering the two bodies represented in the above figure: one with a mass \(M\) and another with mass \(m\) , separated by a distance \(d\) , a gravitational attraction will occur between them, whose intensity is: $$ F = G\frac{ M m }{d^2},$$ where \(G\) is a constant of modulus \(6.67 \times 10^{-11} N(\frac{m}{kg})^2\). The directions of forces are in a straight line connecting the centers of objects, and the direction is from one object to another, as shown in the figure.
As a result of the attraction that the celestial bodies exert on each other, the following laws can be deduced. They were discovered by Kepler.
Note: The farther a planet is from the Sun (larger radius), the greater its period of rotation around the Sun ( the greater the \(\tau\) ).