Every pitch has a specific rate of vibration. If you take any particular pitch and double its rate of vibration, you are playing that note one octave higher. Likewise, if you decrease the rate of vibration by exactly one-half you reproduce that note an octave lower.
What does that mean on the guitar?
Well, assuming your guitar is in standard tuning, and you play the first string (the skinniest one) without pressing down on any fret, you'd be playing an E note. Now, if you go up on that same string and play the twelfth fret, you'd be playing an E again, only this time it would be one octave higher.
Let's take another note. Play the SIXTH string, THIRD fret. This is a G note. Now, go to the FOURTH string and play the FIFTH fret. This is also a G note, except that it's one octave higher.
There are twelve notes in music. They are "divided" into two groups - the "naturals" and the "accidentals."
There are seven naturals. They are:
A, B, C, D, E, F, G
The are five accidentals, and they are found "in between" the naturals. They are named depending on how you look at them. For example, take the note between A and B. You can either call it an A-sharp (written as A#) or a B-flat (written as B♭).
The five accidentals are:
A#(B♭), C#(D♭), D#(E♭) F#,(G♭) and G#(A♭)
(If you notice, there is no accidental between either B-C and E-F. There is no such thing as a "B-sharp/C-Flat," or an "E-sharp/F-flat." Unless you plan on reading music, don't worry to much about it.)
The prefix in the word octave, "octo-," means "eight." There is a simple reason for this.
The major scale is the foundation of all western music. If you take all the twelve notes in existence and put them in order, you have what's known as the CHROMATIC SCALE. And, if you start on ANY ONE of these notes and follow a specific pattern, you can derive the notes of the major scale for that particular key. (If you don't know much music theory, don't worry about that stuff for now, though.)
The major scale has SEVEN notes. If you go back to the chromatic scale and choose C as your starting note and follow the pattern, you will end up with the C Major Scale, which is: C, D, E, F, G, A, B, C. That last C, the "eight" note of the scale, is actually the first note of the next octave of the C Major Scale.
(Amazon.com has plenty of music theory books specifically for guitarists.They might be of help.)