When a beam of light passes through a relatively cooler gas, certain frequencies characteristic of the gas atoms or molecules are absorbed. The resultant spectrum then demonstrates dark lines or bands on a continuous background. It is known as an absorption spectrum. When an electron absorbs energy, it goes into an excited state. The atom with an electron in the excited state is called an excited atom.
Electrons move in orbits of different shapes and sizes, depending on their energy.
These are known as orbitals. They are unlike the planets orbiting the Sun in the sense that electrons have wave like and particle like properties. Please refer to Fig. For a photon, the energy it carries is given by it's frequency or wavelength. So, a ground state electron may absorb photons of those frequencies only, which elevate the atom to an allowed excited state.