the hydrogen atom has all the shells around its nucleus. but only the first energy level holds the electron.
first you should know that there are shells upto the infinite around every atom's nucleus. it's just that the nuclear attraction of a Hydrogen atom (which is 1 proton x charge of a proton) is only able keep one electron in it's shell. which the innermost shell of the atom (n=1)
when you give extra energy to that atom by exposing it to a high voltage, the electron in the ground level (or the ground state electron of Hydrogen) takes that energy as energy packets (photons) to go to higher energy levels. it can go from n=1 to n=2, to n=3, also if given enough energy, it can also go to n =
that is when you get the absorption spectrum.
the following image shows the path of the electrom lower shells to higher levels.
when the electron takes the energy from the outside, it gets to an excited state which makes it unstable. so the electron again releases the extra energy as energy packets to come back to the ground state. this creates the emission spectrum.
the following image shows the path of the excited electron from higher energy levels to lower ones.
if u still need more information, i suggest you read these articles: