Gravity is understood as how things with mass affect each other in space. Every object has a gravitational effect on every other object, although small objects can't affect anything enough to measure. This is why we stay on the Earth, rather than have the Earth follow us wherever we go.
When Sir Isaac Newton formulated laws of gravity, he showed that if there were two bodies in the universe, you could predict exactly where they would be at any point in their existence. But if you add a third, there is no general formula that will do the same thing. There are only certain groupings and starting points for which this "three-body problem" can be solved.
Physicists recently discovered 13 new solutions to the problem, which brings the total known groups to 16. Since the number of possible starting positions and object sizes approaches infinity, that leaves quite a few left to go.