See also: Isaac Newton and General relativity
All things with mass or energy are brought toward one another. This includes planets, stars, galaxies and even light. On Earth, gravity gives weight to physical objects. The Moon's gravity causes the ocean tides. Gravity caused the original gaseous matter in the universe to coalesce and form into stars. Gravity then causes stars to group into galaxies. Thus, gravity is responsible for many of the large scale structures in the universe. Gravity has an infinity range. However, as objects get further away, its effects become increasingly weaker.
Gravity is accurately described by Albert Einstein's 1915 general theory of relativity. This theory describes gravity not as a force, however, as a consequence of the curvature of spacetime. This curvature is caused by the uneven distribution of mass. The black hole is the most extreme example of this kind of spacetime curvature. Nothing, not even light, can escape the event horizon of the black hole.
Isaac Newton
For most applications, Newton's law of universal gravitation is applicable. Newton's law of universal gravitation says that there is an attractive force between two particles that is directly proportional to the product of their masses and inversely proportional to the square of the distance between their centers.
Gravity is the weakest of the four fundamental interactions. Gravity is about 10^38 times weaker than the strong interaction, 10^36 times weaker than the electromagnetic force and 10^29 times weaker than the weak interaction. Thus, Gravity has little influence on subatomic particles. However, at the macroscopic scale, gravity is the dominant force. Gravity is the cause of the formation, shape and trajectory of astronomical objects.