Essentially it is hydrogen in clouds absorbing energised photons usually from a nearby star emitting UV light. This makes one of the electrons "excite" & change its orbit. As the electron drops back to its non excited state it will release a photon at a particular wavelength. This is the emission line. This has to do with quantum physics and photons only being emitted at particular energy levels.
This is a very simple explanation and I'm sure others will have better.
Cheers
|