The orbits of planets around a star, as well as moons around a planet, are primarily governed by gravitational forces. The fundamental principle behind these orbits is Isaac Newton's law of universal gravitation, which states that any two objects with mass attract each other with a gravitational force.
In the case of a planet orbiting a star, the star's massive gravitational pull keeps the planet in its orbit. The planet moves in a curved path around the star due to the combination of the planet's forward motion and the gravitational force pulling it inward. This results in a stable, elliptical orbit.
Similarly, moons orbiting a planet are also held in place by gravitational forces. The planet's gravity keeps the moon in orbit, just as the star's gravity keeps the planet in orbit. The moon's motion around the planet is influenced by both the planet's gravitational pull and its own forward motion.
The specific characteristics of an orbit, such as its shape and size, depend on several factors, including the mass of the central object (star or planet), the mass of the orbiting object (planet or moon), and the distance between them. The combination of these factors determines the strength of the gravitational force and the resulting path of the orbiting object.
It's important to note that while gravity is the primary force responsible for orbital motion, other factors, such as the initial conditions of the system and the presence of additional gravitational influences, can also affect the precise nature of orbits. Nonetheless, the gravitational interaction between objects is the underlying cause of the orbits we observe in our solar system and beyond.