Wherever matter exists, it bends the geometry of spacetime. This results in a curved shape of space-time which can be understood as gravity. The white lines on the picture on the right represent the effect of mass on space-time.