Absorption lines in the context of identifying elements in far away celestial objects I understand that absorption lines are used to identify elements but how are individual absorption spectrums identified in the light that is received by a telescope?
 A: Well in principle, it's pretty easy. The example of the Sun is often taught in introductory astronomy laboratory courses. The Sun is a nice clean example because it is so bright compared to anything that might contaminate its spectrum. You just put some sunlight through a diffraction grating (or slit, or prism) that you've previously calibrated so that you can measure the wavelength of each line, then compare the resulting absorption spectrum to the spectra of various elements, which you could look up in a table or measure from clean samples in your lab. Schematically you do something like this:

From there it's just a simple matter of matching up solar spectrum lines with known element lines - usually starting with the most obvious ones. In this case the one that stands out the most is the sodium (Na) doublet. Not every line from a particular element may be visible - the conditions on the Sun are such that some electronic transitions (corresponding to particular lines) just don't happen often enough to produce a visible line.
Things get more complicated for fainter stars, because their spectrum is easily contaminated. For instance, there are both emission and absorption features in the Earth's atmosphere which will be measured simultaneously with a stellar spectrum when using a ground-based telescope. Fortunately, people have gone to great lengths to measure and model the atmospheric lines so that they can be removed as cleanly as possible from a stellar spectrum.
Another complication is red/blueshift. The wavelength at which a given line occurs is fixed, but the detected position of the line can change if the source is moving (doppler shift), is in a strong gravitational field (gravitational redshift, such as near a black hole), or is in an expanding universe (cosmological redshift). Fortunately all lines from a source are shifted by the same factor - for instance a source with a cosmological redshift of 1 would have the measured wavelengths of all its lines doubled from what you would measure in the lab (redshift $z=\lambda_{\rm obs}/\lambda_{\rm emit}-1$). Because the change is uniform for all lines, we can still use the spacing between the lines to figure out which one is which. This still involves a bit of guesswork, usually you need to start with a strong line and make an educated guess about what physical process is causing it, then start trying to identify more lines consistently with your guess.
Finally, I happen to have an example of a spectrum lying around (it's from this paper). In this case the source is moving at more than $-1000 \rm km/s$ relative to the telescope, so there is a slight doppler shift (about .3% change in wavelength). The source is close enough that cosmological redshift is unimportant.

Here there are a number of absorption lines. The most prominent are some of the hydrogen Balmer series ($n\rightarrow2$ transitions), $\rm H\alpha$, $\rm H\beta$, $\rm H\gamma$, $\rm H\delta$, $\rm H\epsilon$. These are a good starting point because if one in the series appears, often others do as well, and they are all in a part of the spectrum that is easy to observe from Earth (not blocked by the atmosphere). There is also the $\rm H$ & $\rm K$ lines of singly ionized  $\rm Ca$. The G-band is actually a set of closely spaced absorption lines of the $\rm CH$ molecule. Finally, the lines marked $\oplus$ are emission lines from the Earth's atmosphere. Most of the atmospheric lines were removed from this spectrum, but these left some residuals because the atmospheric model was imperfect. The paper shows the spectrum, but doesn't mark the individual lines (though it does say which lines are present). I was giving a talk and wanted to label the individual lines, so I went through trying to identify them all. Initially I made a couple of wrong guesse, but once I figured out a couple of the Balmer lines the rest fell into place.
