I have a sound file of the recording of the note C on the piano which I have made a Frequency Spectrum graph of using the audio editing program Audacity:
I need to create a table listing the harmonic series fragments that correspond to each peak frequency in the graph and then compare each fragment with the idea series fragment. What I'm not really clear on is how exactly the harmonic series relates to a frequency spectrum. I've seen on Wikipedia that strings for example vibrate at several frequencies at the same time corresponding to the harmonic series and also articles like this one which detail examples of pressing one note (C for example) and then playing C one octave higher, releasing the lower C and then still hearing the higher C even though it didn't initially make a sound. I don't really understand, however how these examples relate to specific pitches being heard.
Is it that each term in the harmonic series corresponds to each note (on a keyboard for example)? If not, how do the terms of the harmonic series correspond to peaks in a graph like the one above?

What happens when you strike a note on an instrument, like the piano, for example, is the fundamental note and then multiples of that frequency. Assuming you hit C4 on the piano, these are the harmonics you would hear, with each harmonic becoming quieter.
So for example, 1 x 261.63Hz = 261.63Hz, 2 x 261.63Hz = 523.26Hz, 3 x 261.63Hz = 784.89Hz ...
From your image you should be able to recognise some of these notes coincide with the peaks.
This is the sequence produced in the harmonic series. Some people can hear the first few harmonics clearly, if shown, while others can identify up to around 7 or so harmonics, as these get progressively weaker. Some of the higher harmonics will also be severely out of tune with standard 12-tone equal temperament music.