Dark-line spectrum is a "photo-negative" of emission spectrum. It is the gaps that appear in precisely the same location as corresponding bright lines. produced by a cool gas with a hot solid and you
The dark line spectrum are formed by an individual atom, it is because in the gaseous state, the individual atoms are quite apart and they do not interact each other.
When electrons jump from the excited state to the ground state, the electrons emit energy in the form of light, producing a bright-line spectrum. Each element has its own unique bright-line spectrum.