We will first discuss generic intervals, which are measured on the staff.
When two notes occupy the same line or space, they are a first (or a prime) apart.
C to C is an example of a first.
C to Cb and C to C# are also firsts.
When two notes are askewed to each other, they are a second apart.
C to D is an example of a second.
C to D#, Cb to D, and Cb to D# are also seconds.
When two notes are stacked tightly together, they are a third apart.
C to E is an example of a third.
E to G and F to A are also thirds.
As the notes become further apart, their interval type increases.
C to F is a fourth.
C to G is a fifth.
C to A is a sixth.
C to B is a seventh.
C to C is an eighth (or octave).