All music theory really begins with an understanding of the major scale. The major scales is used as a constant to with which other elements are compared.
Below is an important tidbit of information before we get started.
All natural notes (A B C D E F G) are a whole step (2 frets) apart, except between E-F and B-C which are a half step (1 fret) apart.
A major scale is nothing more than a series of whole steps and half steps. Writing the natural notes from C-C will create a C major scale.
The easiest way to remember the formula for a major scale is this. There are 2 sets of WW 1/2 separated by a W. The W stands for whole step, and the 1/2 stands for half step.
W W 1/2 W W W 1/2
This same pattern can be applied to any set of 8 consecutive notes. For example if the natural notes between G-G were written, F would have to be raised a half step to F sharp in order to create the formula needed to make a major scale.
In the next example the notes from F-F are written. In this case the B would have to be lowered a half step to a B flat in order to conform to the pattern.
As I have mentioned before the major scale is used as a constant to with other elements are compared. For the purpose of comparison, the degrees of the major scale a assigned numbers from 1 to 7. These numbers are the function of the note within the scale.
Things to do
1. Pick any note on any string, preferably within the first 3 or 4 frets. Then play a major scale going up on one string following the pattern learned above. The names of the notes are not important for this exercise.
2. Play different major scale fingerings, getting to know the degree names (numbers 1-7). The scale fingering below is a good starting point.
*note: sharps (#) or flats (b) come before notes in standard notation, but after the letters below.
D E F G A B C D A B C D E F G A
E F G A B C D E B C D E F G A B
F# G A B C D E F Bb C D E F G A B
Eb F G A B C D E Ab B C D E F G A
Db E F G A B C D Gb A B C D E F G