In music theory we use the word interval when we talk about the distance between two tones. Interval names consist of two parts, the general and the specific part. You find the general name by counting the lines and spaces between two notes:
Not all intervals with the same general name has the exact same size. From the tone c to the tone d there is two semitone steps, but from e to f there is only one semitone step. Both intervals are called a second, but the first interval is a major second and the second is a minor second. The specific name of an interval tell you the exact size of the interval.
The easy way to remember the specific names of intervals is to think of a major scale starting from the lowest of the two notes.
If the upper note is higher or lower than the scale note, then we find the name by counting how many semitone steps larger of smaller the interval is comparted to the interval from the major scale.