Albert Einstein explained that what we perceive as the force of gravity in fact arises from the curvature of space and time.
He found that space and time were actually interwoven into a single continuum known as space-time.
As he worked out the equations for this general theory of relativity, Einstein realised that massive objects caused a distortion within this continuum.
Imagine a large body in the centre of a trampoline. The body would press down into the fabric, causing it to dimple. If a marble was then rolled around the edge, it would spiral inward toward the body, pulled in much the same way that the gravity of a planet pulls at rocks in space.
He proposed that objects such as the sun and the Earth work in a similar way. In the presence of matter and energy they can evolve, stretch and warp, forming ridges, mountains and valleys that cause things moving through to zigzag and curve.
Einstein determined that massive objects (like the Earth) cause a distortion in space-time which is felt as gravity.