Gravity, or gravitation, is a natural phenomenon by which all things with mass are brought toward (or gravitate toward) one another, including objects ranging from atoms and photons, to planets and stars. Since energy and mass are equivalent, all forms of energy (including light) cause gravitation and are under the influence of it. On Earth, gravity gives weight to physical objects, and the Moon's gravity causes the ocean tides. The gravitational attraction of the original gaseous matter present in the Universe caused it to begin coalescing, forming stars and for the stars to group together into galaxies. Gravity is responsible for many of the large scale structures in the Universe. Gravity has an infinite range, although its effects become increasingly weaker on farther objects.
Gravity is described in general theory of relativity not as a force, but as a consequence of the curvature of spacetime caused by the uneven distribution of mass. A theoretical example of spacetime curvature is a black hole, from which, hypothetically— nothing—not even light, can escape once past the black hole's event horizon. However, for most applications, gravity is well approximated by Newton's law of universal gravitation, which describes gravity as a force which causes any two bodies to be attracted to each other, with the force proportional to the product of their masses and inversely proportional to the square of the distance between them.