Every planet is pulled toward the Sun by Newton’s law of gravitation, F = G·M·m / r². The part worth keeping is the r²: the pull falls away with the square of the distance, which is why Mercury is whipped around in a matter of weeks while Neptune takes longer than a human lifetime to get round even once.
Nothing here follows a drawn path. Sixty times a second the simulation asks how hard the Sun is pulling on each planet, nudges its speed by that much, and moves it along. An orbit is never programmed in — it is simply what falling forever and continually missing happens to look like.
Because the orbits emerge rather than being scripted, the gravity slider genuinely breaks them. Turn it up and the planets are suddenly moving too slowly for the pull, so they spiral inward; turn it down and they carry too much speed and swing out into long ellipses. The faint circles show where each one began, and the brighter trail shows where it has actually been.