Intervals
An interval is the tonal distance between two notes. This distance is measured in steps. Each interval has a name. For instance, the distance between C and E is two whole steps. This interval is called a major third because it ends on the third note of a major scale.

Conversely, the distance between D and F is one-and-a-half steps. This interval is called a minor third because it ends on the third note of a minor scale, or mode.

Intervals that create some confusion are the major 7th and minor 7th (also called a flatted 7th). This is because the chords that include them, like the Cmaj7, Cm7, and Cdom7 (C7) look very similar. However, Cmaj7 is a four-note chord that consists of a major 7th interval between its root and fourth note. On the other hand, Cdom7 (C7) and Cmin7 have a minor 7th interval between their root and fourth note.
The diagram below shows the difference between the major 7th and minor 7th interval and the chords that result.

The chart shows the names of intervals and the steps between them.

Modes and scales are classified as major and minor depending on the tonal distance between the first and third notes. When a scale or mode has a major interval between these notes, it is called major. When this interval is a minor, it is called minor.
The Diatonic Yardstick
The diatonic scale is what all other scales and modes are measured against to determine how we write the interval between the root and other notes. In the diagram below we see the diatonic scale in C major compared to the Aeolian mode derived from C Major. As compared to the Major scale, the 3rd, 6th, and 7th notes of the mode are flatted.
Though the Aeolian mode shares all of the same note as the Major scale, when you measure the distance between the notes using the Major scale as your ruler, you see their differences.

The Diatonic scale pattern is what all other modes and scales are compared against. If a note in a scale is three steps distant from the root that interval is called a diminished fifth (often a flatted fifth) because it is a half-step shorter than the perfect fifth of the Major scale.

The above diagram shows how C Major and B Major scale have the same spacing between notes even though the notes are different. The Locrian mode, though it has the same notes as C Major, has notes spaced at different intervals relative to the Major scale.