Here is Music Theory 101 for keys and scales
Some important terms:
KEY: A specific scale or series of notes defining a particular tonality. Keys may be defined as major or minor, and are named after their tonic or keynote. Thus the series of notes with intervals defining a major tonality and based on the key of C is the key of C major. (I will explain what this means a bit later)
SCALE: A series of notes in ascending or descending order that presents the pitches of a key or mode, beginning and ending on the tonic of that key or mode. The degrees of a scale have specific names shown below and each of the unique 12 notes of the chromatic scale can be the tonic note of a scale.
Degrees of a Scale
1 - Tonic
2 - Supertonic
3 - Mediant
4 - Subdominant
5 - Dominant
6 - Submediant - Superdominant
7 - Leading Note - Subtonic
STEP:the interval between one degree and the next, regardless if it is a major, minor, augmented, or diminished second.
CREATING A SCALE: What is the G major scale?
To define the G major scale, we will use the standard Major mode of music. This is defined as having 7 intervals that follow the pattern, Whole, Whole, Half, Whole, Whole, Whole, Whole, Half. What this means, is that of all the notes that are available (A, A#, B, C, C#, etc), if we follow this pattern of W (whole), W, H (half), W, W, W, H, we will make a full circle around. So here is a more detailed structure:
W W H W W W H (Step)
G A B C D E F# G (Note)
1 2 3 4 5 6 7 8 (Degree)
So, when we are playing in the key of G major, these are the notes that will be used. If you were to find your favorite song in G major (For example, Time of Your Life by Green Day) and play these notes in some order, it will sound pretty good and probably fit in the song. There is a little bit more to solo'ing than this, but here is your foundation!
USING THE SCALE TO MAKE CHORDS:
Now that we have defined all the notes that are in our scale, we can start building chords. Now, to create chords, there are certain rules that we follow. First, the basis of all modern music (besides jazz and some blues) is based off of 3rds. What I mean by "3rds" is that the amount of steps involved from one note to the next is a 3rd jump. For example, the chord G Major has the notes G, B, and D. From G to B, we have a 3rd, or an Interval spanning two diatonic scale steps. There is also a 3rd from B to D.
So, using our scale we can build all of the chords to use. We will have 7 chords, since there are 7 notes in our scale
1 -> G, B, D
2 -> A, C, E
3 -> B, D, F#
4 -> C, E, G
5 -> D, F#, G
6 -> E, G, B
7 -> F#, A, C
Now, to define what these chords are. A major chord is built of 2 specific thirds: A major third in the first 3rd, and a minor third in the second 3rd. To further clarify, if we look at the G chord which has G, B, and D. To count up from G to B, we go G, G#, A, A#, B -> 4 half steps. From B to D, we have B, C, C#, D -> Only 3 half steps. So we can define a major third as having 4 half steps and a minor third having only 3 half steps.
Let's analyze the next chord: A C E
To count up from A to C, we have A, A#, B, C -> 3 Half steps. This is a minor third. From C to E, we have C, C#, D, D#, E -> 4 half steps. This is a major third. So we now have the reverse of what we had before. This is a Minor Chord.
Here are the rest of the chords and their names
1. G Major
2. A Minor
3. B Minor
4. C Major
5. D Major
6. E Minor
7. F# Diminished (Special case, don't worry about this right now)
This pattern is true of all Major keys. All you need to do is define the scale, and then same chordal names will follow. For example, here is C major next to G major.
C Major G Major
D Minor A Minor
E Minor B Minor
F Major C Major
G Major D Major
A Minor E Minor
B Dim. F# Dim.
PUTTING ALL THIS STUFF TOGETHER:
So now we have defined a scale and we have defined the chords that go with that scale. What does this all mean? It means that now we have defined what is in a KEY. So, when someone says they are playing in the key of G major, they are using the scale and the chords of that key. There are also many other ways to describe keys: Minors, Modes, etc. These require a bit more understanding to get a hold of, but use the same notes as a major scale, just arranged in a different order.
Hope this information helps. If you have any more questions, just ask! Have a good stay!