The force that keeps the Earth and planets in orbit is gravity. Gravity is a force directed towards the central mass (the sun in this case). But forces produce *acceleration*. So if the planet is moving sideways, the force pulls that stright line into a circular (or elliptical) orbit. Essentially, the sideways motion gives some angular momentum that needs to be preserved and falling directly in would violate that.
For electrons in an atom, things are more complicated. First, the force involved is the electromagnetic force. Which, between electrons and nuclei does work in a way similar to gravity *for macroscopic objects). The problem is than an accelerating charge will lose energy by emitting light and that doesn't happen in an atom.
In fact, the lowest 'orbital' in an atom has no angular momentum! What actually happens is that the Heisenberg uncertainty principle comes into play. Essentially, if the electron tried to collapse close to the nucleus, we would know where it is located, which means its momentum would be uncertain, meaning it wouldn't *stay* close to the nucleus.
So there is a playoff between the electromagnetic force and the uncertainty principle making it so even the electrons at the lowest energy have to stay away from the nucleus.
For electrons in an atom, things are more complicated. First, the force involved is the electromagnetic force. Which, between electrons and nuclei does work in a way similar to gravity *for macroscopic objects). The problem is than an accelerating charge will lose energy by emitting light and that doesn't happen in an atom.
In fact, the lowest 'orbital' in an atom has no angular momentum! What actually happens is that the Heisenberg uncertainty principle comes into play. Essentially, if the electron tried to collapse close to the nucleus, we would know where it is located, which means its momentum would be uncertain, meaning it wouldn't *stay* close to the nucleus.
So there is a playoff between the electromagnetic force and the uncertainty principle making it so even the electrons at the lowest energy have to stay away from the nucleus.