Thus, according to Newton's law, two bodies with masses m1 and m2 separated from each other by a distance r are attracted to each other with the force equal to:
m1-------r----------m2     
F = G (m1*m2)/r^2
This is the law of universal gravitation:
the forces of gravitational interaction between two point masses are directly proportional to the product of these masses, and inversely proportional to the square of the distance between them. These forces always act and are directed along a straight line connecting these point masses.
The gravitational force depends on the distance between the masses as 1/r^2, that is, F = f (1/r^2), this is the law of inverse squares (the value of some physical quantity at a given point of space is inversely proportional to the square of the distance from the field source that characterizes this physical quantity) plays a crucial role in Newtonian gravity, and comparing Einstein with the General Relativity gives a deeper understanding.
The law of inverse squares was formulated in 1645 by IsmaĆ«l Bullialdus, the French astronomer. This law is very clearly demonstrated as the decrease in intensity (that is, the energy per unit area per unit time) on the surface of the sphere from the distance of the source placed in the center of the sphere. See the link  https://en.wikipedia.org/wiki/Inverse-square_law Let's look at the picture: