Gravity is caused by the warping of spacetime around massive objects. Objects with mass create a gravitational field that attracts other objects towards them.