Prior to 1922, atomic emission was used to qualitatively identify elements, but was too imprecise for quantitative analysis. Lester Strock developed the use of internal standards (see our page on internal standards as well) to compensate for the sample-to-sample and time-dependent variations in signal generation from a fixed quantity of analyte. Up to the end of the Second World War, the common atomic emission sources were flames, arcs, and sparks (the latter the result of applying a sufficiently high electrical potential between two conducting electrodes to cause ionization of the gas between the electrodes). In the next three decades, there was a burst of creativity, leading to the use of low pressure sources (hollow cathode lamps, glow discharges, electrodeless discharge lamps), atmospheric pressure plasmas (inductively coupled plasma, DC plasma), and laser-initiated plasmas (laser microprobe, laser-induced breakdown) for sampling and excitation of materials. While the details and experimental parameters vary among these sources, the essentials of turning bulk materials into individual atoms, putting energy into the atoms to excite them, and then observing light emitted by those atoms as they drop to lower energies is universal.
Atoms can only exist in certain discrete energy levels. Typically, at low energies, the levels are far apart. At higher energies, they are closer together. At sufficiently high energy, an electron is removed and the atom ionized. The ion has widely spaced energy levels, that in turn get closer and closer together until another electron can be removed. This process can continue until all the electrons are ionized and the nucleus is bare. The only common fully-ionized species is H ion, a bare proton.
A visual way to understand that light emission and absorption occur at the same wavelengths is to sketch a Grotrian diagram (named for Walter Grotrian, a German astronomer from the first half of the 20th century). An atom (or molecule) can go from a lower to a higher energy state by absorbing light or by colliding with another atom or ion with sufficient energy. By convention, emission occurs from an atom that was excited to its upper state by collision or absorption of ambient light. Fluorescence occurs from an atom that was excited to its upper state by light specfically supplied for that purpose.