Spectral lines are emission or absorption at a discrete wavelength (or frequency) caused by a specific electron transition within an atom, molecule, or ion. The dark lines in an absorption spectrum and the bright lines that make up an emission spectrum are caused by the transfer of an electron from one energy level to another.
The essential difference between optical line spectra and X-ray spectra is that the former correspond to energy changes in the outer electrons in an atom, and the latter to energy changes in the inner electron orbitals. Gamma rays usually correspond to energy changes in the nucleus. Infrared radiation is produced by high-n transitions of atoms or by the vibration or rotation of molecules. Thermal radio emission is usually produced by still higher-n transitions.
The width of an absorption line or an emission line in a spectrum, usually quoted as full width at half maximum (FWHM). Any line broadening present may shed light on processes taking place in the absorbing or emitting region.