Unlike planets orbiting the Sun, electrons cannot be at any arbitrary distance from the nucleus; they can exist only in certain specific locations called allowed orbits. This property, first explained by Danish physicist Niels Bohr in 1913, is another result of quantum mechanics—specifically, the requirement that the angular momentum of an electron in orbit, like everything else in the quantum world, come in discrete bundles called quanta.

In the Bohr atom electrons can be found only in allowed orbits, and these allowed orbits are at different energies. The orbits are analogous to a set of stairs in which the gravitational potential energy is different for each step and in which a ball can be found on any step but never in between.
The laws of quantum mechanics describe the process by which electrons can move from one allowed orbit, or energy level, to another. As with many processes in the quantum world, this process is impossible to visualize. An electron disappears from the orbit in which it is located and reappears in its new location without ever appearing any place in between. This process is called a quantum leap or quantum jump, and it has no analog in the macroscopic world.
Because different orbits have different energies, whenever a quantum leap occurs, the energy possessed by the electron will be different after the jump. For example, if an electron jumps from a higher to a lower energy level, the lost energy will have to go somewhere and in fact will be emitted by the atom in a bundle of electromagnetic radiation. This bundle is known as a photon, and this emission of photons with a change of energy levels is the process by which atoms emit light. See also laser.
In the same way, if energy is added to an atom, an electron can use that energy to make a quantum leap from a lower to a higher orbit. This energy can be supplied in many ways. One common way is for the atom to absorb a photon of just the right frequency. For example, when white light is shone on an atom, it selectively absorbs those frequencies corresponding to the energy differences between allowed orbits.
Each element has a unique set of energy levels, and so the frequencies at which it absorbs and emits light act as a kind of fingerprint, identifying the particular element. This property of atoms has given rise to spectroscopy, a science devoted to identifying atoms and molecules by the kind of radiation they emit or absorb.
This picture of the atom, with electrons moving up and down between allowed orbits, accompanied by the absorption or emission of energy, contains the essential features of the Bohr atomic model, for which Bohr received the Nobel Prize for Physics in 1922. His basic model does not work well in explaining the details of the structure of atoms more complicated than hydrogen, however. This requires the introduction of quantum mechanics. In quantum mechanics each orbiting electron is represented by a mathematical expression known as a wave function—something like a vibrating guitar string laid out along the path of the electron’s orbit. These waveforms are called orbitals.