Octave is just a frequency multiplier of two.
Octaves has nothing to do with switching strings.
You can play a scale on one string or switching strings cos the construction of the guitar is such that notes are repeated. At the same time u can play a note and its octave on the same string.
consider the two number lines below:
now to count from 1 to 9, u can count it all in A, or count to 5 in A and switch to B.
both 5's in A and B are the same. Switching strings while playing scales is something like that. Now 5 appears twice in each list - the second appearance can be likened to an octave. Though it doesn't make a difference in numbers, it makes a diff in notes (the second appearance of the note is twice the frequency of its first appearance).
read this for some more gyan:
and ask if u still have queastions.
hope it helps.
Aadalaam Vaa, Paadalaam Vaa, Kondaadalaam Vaa
Engum Endrum Pongidudhe Inbam, Inbam Pozhiyude