Physicist: Newton’s laws of motion say:
Where MP and AP are the mass and acceleration of a planet, MS is the mass of the Sun, R is the distance between them, and G is a universal constant. What this rather bold statement says is “if you exist near the Sun, then you are accelerating toward it”. Each of the planets, moons, grains of dust, etc. all say the same thing, it’s just that with 99.86% of the mass in the solar system, the Sun says it loudest.
A force, like gravity, accelerates the object it acts on. So to understand what a force does it’s important to understand acceleration. Velocity describes how fast your position is changing, while acceleration describes how fast your velocity is changing.
“Velocity” is different from “speed” because velocity is a description of how fast you’re going and in which direction; “10 mph north” is a velocity, while “10 mph” is a speed. So you can have an acceleration that changes your velocity by changing your speed and/or by changing your direction.
Imagine you’re in a car (your velocity points forward):
If you accelerate forward, you speed up.
If you accelerate backward, you slow down (“decelerate”).
If you accelerate to the right or left, you turn in that direction but maintain the same speed.
Notice that when you talk about acceleration this way, suddenly the same push you feel into your seat when you step on the gas is the same as the push you feel into your seat belt when you brake and the same as the centrifugal force pushing you to the left when you turn right.
With planets the same rules apply. A planet moving around the Sun in a circular orbit always has the Sun about 90° to the side of the direction they’re moving. This means that the planet is always turning, but always moving at about the same speed. The planets are moving so fast that by the time they’ve turned a little, they’ve moved far enough that the Sun is in a new position, still 90° to the side.
So that’s how a planet can accelerate toward the Sun forever without getting any closer. The sideways motion of planets is due to the fact that if a planet were not moving sideways, it would find itself in the Sun in short order. In fact, the Sun is nothing more than a massive collection of all the matter from the formation of the solar system that wasn’t moving sideways fast enough (which is nearly all of it).
Why things end up in circular orbits is a more subtle question. The quickest explanation is that things in not-circular orbits run into trouble until either their orbit is sufficiently round or they’re destroyed. It’s not that circular orbits are somehow better, it’s just that other orbits carry more risk of serious impacts or gravitational interactions (e.g., with Jupiter) that may lead to short, unfortunate orbits.
Assuming that an orbit is stable, then it will be an ellipse (there’s a post here on exactly why, but it’s a a whole thing.). A circle is the simplest kind of ellipse, but ellipses can be extremely stretched out. For example, comets have very elliptical orbits (like Sedna in the picture below). In these orbits the comet is mostly moving toward and away from the Sun, so for them the Sun’s pull mostly changes their speed and changes their direction less.
There’s nothing special about the orbits the planets are in. The eight (or nine or more) planets we have in the solar system aren’t the only planets that formed, they’re the only planets left. When things are in highly elliptical orbits they tend to “drive all over the road” and smack into things. When things smack into each other one of a few things happen; generally they break or they don’t. When we look at our planetary neighbors we see craters indicating impacts right up to the limit of what that planet or moon could handle without shattering. Presumably there should be impacts bigger than a planet can stand, but (not surprisingly) those impacts don’t leave craters for us to find.
So objects with extremely elliptical orbits are more likely to get blown up. But even when two objects hit each other and merge, the resulting trajectory is an average of both objects’ original trajectories, and that tends to be more circular. This is a part of accretion, and Saturn’s rings provide a beautiful example of the nearly perfect circular orbits that result from it.
Given a tremendous amount of time, a big blob of material in space tends to condense into a ball (with most of the matter) and a thin disk of left over material traveling in circular orbits around it.