Electrons are excited (usually by running an electric current through them). This causes electrons to 'jump' into higher electron shells ( X -> X* ) this state is only temporary, however, and the electron falls back to its ground state. This change (When the electron falls back from the higher shell to a lower one) decreases the energy of the electron, and this energy is emitted in the form of a photon. If this photon falls into the visible spectrum of light, then it produces a visible spectrum. As electrons move further away from the nucleus, the electron shells become closer together in terms of space and energy, and so lines converge towards the end of the spectrum.
When hydrogen gas is stimulated, it emits a characteristic set of spectral lines. The gas is usually stimulated by passing a current through a sample of the gas at low pressure, but the same effect occurs if hydrogen gas is heated strongly.
The spectral lines have the following characteristics:
There are several series of lines, which become more closely packed at higher frequencies (lower wavelengths) until finally the series ends.
The highest frequency series, discovered by Lyman, is in the ultraviolet. Lower frequency series are in the visible and infrared