An orbit above the lowest energy orbit is called an excited state. An atom can emit light at the same frequencies that it absorbs it, a process called de-excitation or line emission, but the emitted photons generally go in a random direction, not towards the original observer. A neutral hydrogen atom contains a single electron orbiting a single proton. A neutral hydrogen atom only absorbs photons that move an electron from one orbit to another. We can identify the atoms or molecules that produce lines at particular wavelengths by comparing to laboratory experiments.
Different stars display a bewildering variety of absorption spectra.
An important clue comes from plotting spectral class against color. In hot stars, most of the hydrogen is ionized, so it cannot produce absorption lines. This hydrogen produces absorption lines in ultraviolet light, which does not penetrate the earth's atmosphere. The spectral class of a star tells us its surface temperature. But so does the color, which is much easier to measure.