When an electron gets excited by heat or energy and goes up energy levels (lets say from n=2 to n=3). The life time of the excited state is brief, the electrons will return rapidly to the ground state, emitting energy in the form of photons. This is the atomic emission spectra and the equation E=hc/lambda where E is the energy, h= plancks constant, c is the speed of light and lambda is the wavelength of radiation.
Atomic Absorption spectra
When an electron is excited to a higher energy level, it must absorb energy. The energy absorbed as en electron jumps from an orbital of lower energy to higher energy is the characteristic of that transition. So in addition to an emission spectrum, every element poses a characteristic absporption spectrum. (kinda like fingerprints for humans). This can be used to identify element present in a gas phase sample.
Hope this helps or is what you are talking about.