
Albert Einstein completed the general theory of relativity, describing curvature, in 1915. Great help came from mathematicians: Marcel Grossmann taught Einstein tensor analysis, and Bernhard Riemann had already developed the geometry of curved spaces in the 19th century.
Einstein replaced Newtonian attraction with geometry. In flat spacetime, bodies fly along straight lines. In curved spacetime, their paths, called geodesics, bend around massive bodies. The Moon is not 'attracted' to Earth—it rolls along the dent created by Earth's mass in the fabric of the Universe.