According to the theory of general relativity, gravity is not a force, but a result of the curvature of spacetime. The presence of mass warps spacetime, creating a gravitational field. The more massive the object, the stronger its gravitational field.