While you can find this sort of information all over the internet, these are from my own collection of notes that I found I needed to understand certain basic patterns in notes and structure. Please if you can explain any of this better, or correct me, chime in!
A key is an "octave" of 7 notes with the eighth note residing as the resolve back to the first note, known as the "tonic". In all keys these octaves of 7 notes can be simplified to individual tones by #: 1-2-3-4-5-6-7. The "Key* of a song is the root note that the song resolves to. The pattern is made up of M(ajor) and m(inor) notes in the following structure: MmmMMd with the last being called d(iminished). The term diminished comes into play when building chords. In terms of major and minor keys the basic idea is, looking at a piano keyboard for example, a whole note/tone is from one white key past one black key to the next white key so it is 2 half steps. A half step is also called a semitone. So taking the simplest key, "C" as an example in summary. the notes are:
NOTE # STEP M/m/d
C 1 M -- tonic (the root of the C octave key)
D 2 m whole tone (T)
E 3 m whole tone (T)
F 4 M half semitone (S)
G 5 M whole tone (T)
A 6 m whole tone (T)
B 7 d whole tone (T)
C 8 m half semitone (S) diminished
The 8th resolving note is included in order to show the step relationship from the last note of the scale to the resolving note an octave away.
The interesting point here, is MmmMMmd exists as a descriptor not for the keys themselves but for Chord building. The last diatonic chord of a scale is a diminished chord. Diatonic chords are the MmmMMmd chords in all the Chords of the "Circle of Fifths" which great tool to understand these arrangements and tone relationship. I am not going to go further into the Circle of Fifths, Much information and many examples of this can be found, on the internet. Just know it is a valuable tool to help you learn note relationship up and down the octaves no matter what instrument you are learning. Here is another great link to a Circle of Fifths video.
NOTE: There are more scales than the basic major minor scales. This is not meant to cover every aspect it is intended to encapsulate just basic knowledge. The Music Keys on the other hand are based on the 7 frequencies, C-D-E-F-G-A-B-C with major, minor flat and sharp. You can go on into modes and more exotic scales.
Basic Chord Building:
Using the numbers for notes a basic Triad chord is 1-3-5 which means it is a Root, a Third and a Fifth note all played within a relationship with each other. To "flatten' a note play the note a 1/2-step (1 semitone) down. To "sharpen a note" play the note a 1/2-step (1 semitone) up. In the table below, a "b" stands for "flat" and "#" stands for sharp:
1-3-5 = Major Chord
1-3b-5 = Minor Chord
1-3b-5b = Diminished Chord
1b-3b-5b = Flat Chord
1-3-5# = Augmented Chord
1#-3#-5# = Sharp Chord
It should be noted that all single steps between tones are called a 1/2-step or a semitone. A full step or tone, is just 2 half steps (2 semitones). While there are 8 tones in an octave counting the resolving note, there are 12 half steps to get there based on the arrangement of the notes which are based on actual frequencies as we hear them. In a sense note and chord structure is just organizing notes in a way we can make sense out of them to employ them to make sounds pleasing to our ears.
Additionally, while it may be normal to think of the root, being the starting key of a chord.
Inversions are where the same tones are played but in different orders Inversions affect the resulting tone while still being the same chord.
Intervals are two keys played like a chord together or as an arpeggio. 3rds and 5ths are great intervals, and can be mixed in with triad and quad chords for increased sound motifs.
The Relative Key is also important. As a relative minor key, this is the key that is 6 semitones below the Major Tonic/Root note. For example A minor is the relative minor of C Major.
Modes: There are 7 modes. Basically there is 1 mode for every key so 7 modes. The modes (on the piano) use only the white keys in their basic structure starting on each of the tones to their next same tone an octave away. However the pattern can be played starting from any key where W = Whole step and H = half step. In these cases the black keys are used. This is the same and sharp and flat notes for other instruments. Again in this space, I am not trying to show how to play with the modes and much as a basic quick explanation and visual of what they are and how they work, for reference. Click on the Modes link to get more detailed information!
T = Tone (Whole) step and S = Semitone (Half) step
A MINOR T S T T S T T (Aeolian)
B MINOR T T S T T S T
B Locrian S T T S T T T
C MAJOR T T S T T T S (Iolian)
D MINOR T S T T S T T
D Dorian T S T T T S T
E MINOR T T S T S T T
E Phrygian S T T T S T T
F MAJOR T T S T T T S
F Lydian T T T S T T S
G MAJOR T T S T T T S
G Mixolydian T T S T T S T
Moving from the classical use of the Modes, the two that have prevailed into modern music are Ionian which has become the modern Major scale and Aeolian which has become the modern Minor scale. The modes delve deeper into different expressions of the major and minor scales.
Reading the Scales
What follows is a break down of 4 octaves C to C with Middle C in the middle and the solid lines representing the Treble and Bass clef Stanzas.
A basic timing signature (structure) is the basis of a song. While there are many time signatures, this is again, only to bring it to the attention. Most common radio songs are in 4/4 where there are 4 beats to a measure. These for beat can be filled in with finer beats divisible y 4, for the most part, accepting accents and human error. The way you might count this divisions in 4/4 are offered here:
Straight 4 = 1-2-3-4
Eighths = 1 and 2 and 3 and 4
Twelfths = 1 and a 2 and a 3 and a 4 and a
Sixteenths = 1 e and a 2 e and a 3 e and a 4 e and a.
Diatonic Chart of all Major Chords with the 1-IV-V pattern highlighted. Check this out and find patterns that can help memorize this basic mother of western octave note and chord structure.