The interval (in pitch) between two notes has two parts: the quantity and the quality. Intervals are defined with a number (the quantity) and a name (the quality). Quality is either major, minor, perfect, diminished or augmented. Intervals are either going up (ascending) or down (descending).
If you have trouble with the notation and/or building major scales, please go back to the post about scales.
Major and perfect intervals
Intervals based on the major scale are either major or perfect. For ascending intervals, given the starting pitch (note), we use the major scale rooted at that starting pitch to find the pitch (note) that corresponds to the major or perfect interval we are looking for. The number in the interval, the quantity, is the degree of that pitch.
The term major refers to degrees 2 (major 2nd), 3 (major 3rd), 6 (major 6th) and 7 (major 7th).
The term perfect refers to degrees 1 (perfect unison), 4 (perfect 4th), 5 (perfect 5th) and 8 (perfect octave).
For example, to find the ascending perfect 5th from F:
F G A B♭ C D E F
Since we need to find an interval starting from F, we build the F major scale (major scale rooted at F, our starting pitch). Please, remember that there is a natural half-step between B-C and E-F (that's really fundamental to know). Once we have the F major scale laid out, all we need to do now is find the pitch corresponding to the quantity of the interval we are seeking, that is 5. The ascending perfect 5th from F is thus C.
To find descending intervals is pretty much the same thing except that we need to consider the major scale formula counting backwards from the degree indicated by the interval.
For example, to find the descending major 6th from C:
____C B♭ A♭ G F E♭
To get the descending major 6th from C, we use the backwards major scale formula starting from C but at degree 6. This gives us E♭ as the descending major 6th from C.
Minor, diminished and augmented intervals
When we diminish the quality of a major interval (by a half-step), it becomes minor.
When we diminish the quality of a perfect interval, it becomes diminished.
When we diminish the quality of a minor interval, it becomes diminished.
When we augment the quality of a major or perfect interval (by a half-step), it becomes augmented.
When we augment the quality of a minor interval, it becomes major.
Notice that a major interval is diminished first to a minor while a perfect interval goes straight to diminished. On the other hand, both major and perfect intervals become augmented when increased (by a half-step).
In practice, to obtain an interval that is either minor, diminished or augmented, we look for the corresponding major or perfect interval and modify the obtained pitch by a half-step.
For example, let's try to get the ascending minor 6th from F:
F G A B♭ C D E F
First, we get the major 6th, D. Since a minor interval is a major interval diminished by a half-step, we lower what we found by a half-step to get D♭.
Another example, let's find the diminished 5th from A:
A B C# D E F# G# A
The perfect 5th starting from A is E. To get the diminished 5th, we lower the pitch by a half-step which gives E♭.
Compound intervals are larger than an octave. They are considered equivalent to the corresponding intervals at the lower octave.
A major 9th interval is a major 2nd plus an octave.
A major 10th interval is a major 3rd plus an octave.
A perfect 11th interval is a perfect 4th plus an octave.
A perfect 12th interval is a perfect 5th plus an octave.
A major 13th interval is a major 6th plus an octave.
A major 14th interval is a major 7th plus an octave.
A perfect 15th is a perfect octave plus an octave, that is, two octaves.
Well, that's about it about intervals. Learning how to build intervals and recognize them seems a bit (a lot) tedious at first glance but it's the foundation we need to build chords.