If centrifugal force stopped working, the planets would be pulled toward the sun. The two forces are balanced, so the planets remain in their places. The sun is a star. Its natural satellites, including the earth, are called planets. The earth and the other planets revolve around the sun.
Some planets have natural satellites, called moons.
Our moon revolves around the earth. The sun and the earth are not the only sources of gravity. Everything in space has its own gravity. Large objects like planets have stronger gravity, and small objects like meteors have weaker gravity. So just as earth's gravity holds the moon in position, the moon's gravity holds in place a spaceship that lands on the moon.