Like toy cars chasing each other on a looped racetrack, three stars can, in principle, trace out a figure-eight orbit in space. This surprising pattern of motion arises from the force of gravity acting on three bodies of equal mass. The movements are timed so that each body in turn passes between the other two. Moreover, such coordinated movements aren’t the only intricate maneuvers possible when several bodies attract one another gravitationally.
Newton’s laws provide a precise answer to the problem of determining the motion of two bodies under the influence of gravity. If the solar system consisted of the sun and a single planet, for example, the planet would follow an elliptical orbit. When the system consists of more than two bodies, solving the relevant equations of motion gets very tricky.