Intervals are a way of measuring the distance between and the correlation of two notes. There are many different types of intervals. Here is a course on how to derive intervals.
Types of Intervals
Number of Semitones
Melodic and harmonic Intervals
Notes that form an interval can be played simultaneously (at the same time) or successively (one after another). Respectively, these intervalls are called melodic (horizontal) or harmonic (vertical). Whether an interval is harmonic or melodic is not relevant for the type of an interval. A major sixth, for example, can be played harmonically or melodically.