Have you ever listened to a seasoned musician talk about music theory? If not, that's okay. But if you have, chances are they have mentioned the term intervals at some point. But what are they really talking about? What are intervals? What do I mean when I say minor 3rd or perfect 4th? The answer is quite simple, and that's what I am going to discuss right now.
First things first: We need a definition.
When musicians speak about intervals, they are simply referring to the musical distance between notes. Intervals get their names based on the number of half steps between any two notes. One half step is equal to one fret on your guitar.
So now that we know what intervals are, let's take a closer look. We will use the A string to demonstrate intervals. Here are all the notes on the A string:
A - A#/Bb - B - C - C#/Db - D -D#/Eb E - F - F#/Gb - G -G#/Ab -A
From the open A string to the A note at the 12th fret and all the notes in between represent one octave. Within that octave lies space for the twelve notes and their intervals. The interval names are based on a numeric value from a second to a seventh. To show you this, I am going to ignore the sharps and flats for a brief moment.
A second interval gets its name because it contains 2 consecutive pitch names. For example, from A to B is a 2nd because it contains 2 pitch names, A and B. From A to C is a third because it contains 3 pitch names, A B and C. From A to D is a 4th because it contains 4 pitch names, A B C and D. Do you see the relationship? If you count the number of note names from one natural note to another, you will get the basic interval belonging to those two notes. For example, from B to G is 6 notes (B C D E F G) and this gives you a sixth. From D to F is three notes (D E F) giving you a third. From A to E is five notes (A B C D E) giving you a fifth.
Okay, so we know have figured out how to count notes to come up with our intervals. But we are not done yet. We still have a problem: this system only uses 7 terms for the twelve possible intervals. To deal with this, we treat them kind of like sharps and flats by giving each interval a more specific name, which we are going to talk about next. These names are Major, Minor, Perfect, Augmented, and Diminished. Let's check this out.
MAJOR AND MINOR INTERVALS
Seconds, thirds, sixths, and sevenths can be either major or minor depending on the number of half steps forming the interval. It's time to go back to our A string. Notice how from A to B on your guitar is two frets, or two half steps. From what we know about counting the notes to come up with an interval we know that from A to B is a 2nd, but what about the distance between A and Bb? This is also a 2nd because it contains both the A and B notes. The difference is in the number of half steps. The distance between A and B is two half steps, or two frets. The distance between A and Bb is only one half step, or one fret. The larger of the two intervals (between A and B) gets the title of Major 2nd. The smaller of the two (between A and Bb) gets the title Minor 2nd.
This works the same for thirds, sixths, and sevenths. The larger forms of these intervals are called Major to distinguish them from the smaller minor intervals.
Now that we have major and minor intervals down, it's time to move on to perfect, Augmented, and Diminished intervals.
PERFECT, AUGMENTED, AND DIMINISHED
Each of the preceding intervals (second, third, sixth, and seventh) exist in major or minor forms. The remaining intervals (fourth and fifth) exist in only one form, so we call them Perfect intervals. If we increase or decrease these intervals by one half step we do not call them major or minor. We call them augmented (raised by one half step) or lowered by one half step (diminished). For example, the interval on our A string defined by A and D is a Perfect 4th (it contains A B C D). If we raise it by one half step to D# we get an augmented 4th. If we lower it one half step to Db we get a diminished 4th. The same goes for a perfect 5th. Take A and E for example. If we raise the E to an F (increase it by one half step) we get an augmented 5th. If we lower that E to an Eb we get a diminished fifth.
The following table is an outline of intervals and their relationships to half steps.

DISTANCEINTERVAL NAME
NoneUnison
One Half StepMinor 2nd
One whole Step (2 half steps)Major 2nd
Three Half stepsMinor 3rd
Two Whole steps (4 half steps)Major 3rd
Five half stepsPerfect 4th
Three Whole Steps (6 half steps)Augmented 4th
Seven Half StepsPerfect 5th
4 Whole Steps (8 half steps)Minor 6th
9 Half StepsMajor 6th
5 Whole steps (10 half steps)Minor 7th
11 Half stepsMajor 7th
6 Whole steps (12 half steps)Octave

So we have finally figured out this interval nonsense. I hope this makes sense to anyone who reads this. If you have any questions, please feel free to ask away!

+1