How does gravity keep the planets in motion around a star?

Let:

Star = Sun
Planets = Earth

It's much simpler to understand the question with what we know.

Now to answer your question:
The gravity of the Sun keeps the earth in it's orbit. This is also true as the Moon orbits the Earth because of the pull of Earth's gravity, the Earth orbits the Sun because of the pull of the Sun's gravity.

Why doesn't the earth just fall into the sun?
Velocity. Earth has it's own velocity, without the sun we would travel in a straight line, due to the sun and it's gravitational pull we don't, instead we go around the sun (we orbit the sun).

This applies to much more that just our star (sun) and our planet (earth). It applies to nearly every solar system out there.

Best of luck,
Ben

I would add that the force of gravity provides exactly the inward directed force required to keep the planet going in a circle. This is just like the tension in a string needed to swing a ball in a circle around you.

Gravity is the force that keeps the planets in motion around a star. In simplistic terms, gravity is a force of attraction between two objects with mass. In the case of planets orbiting a star, gravity between the star and the planets is what governs their motion.

To understand how gravity keeps the planets in motion, we need to consider Isaac Newton's law of universal gravitation, which states that every object in the universe attracts every other object with a force directly proportional to their masses and inversely proportional to the square of the distance between them.

In the case of planets orbiting a star, the star's gravity pulls the planets towards it, trying to bring them closer. However, the planets also possess their own momentum from their initial motion when they formed. This momentum causes the planets to move forward tangentially, which creates a balance between the inward gravitational pull and the outward centrifugal force. This balance results in the planets orbiting the star in an elliptical path.

It's important to note that gravity acts as a centripetal force, continuously pulling the planets inward to the star, preventing them from escaping their orbits. The amount of gravitational force depends on the masses of the star and the planet, as well as the distance between them.

So, to summarize, gravity keeps the planets in motion around a star by balancing the inward gravitational pull with the outward centrifugal force, resulting in an elliptical orbit. This is possible due to the law of universal gravitation, proposed by Newton.