Create a set of flashcards. One side of the flash card should have a music staff in the bass or the treble clef. Write out two notes on the music staff using the 12 common intervals of the musical staff. Include the unison, minor second, major second, minor third, major third, perfect fourth, tritone, perfect fifth, minor sixth, major sixth, minor seventh, major seventh and the octave. The other side of the flash card should identify the name of the interval. Write out intervals in several keys so that you learn to identify them quickly. The act of writing out these intervals will improve your skill, and the flashcards will hone your understanding.
Break the intervals up into seconds, thirds, fourths, fifths, sixths, sevenths, unisons and octaves. Memorize intervals one group at a time. For instance, learn the major and minor intervals in every key first, then move on to the next group of major and minor thirds. You need to be able to identify intervals in two ways. The first way involves looking at them on a musical staff, and being able to identify them by the spacing of the notes. For instance, a third will always be either one space, or one line away from the bottom note. The second way involves knowing them by name -- if someone asks for a major third above C, you should be able to respond instantly with E.
In addition to learning to identify intervals by sight, you should also be able to visualize the intervals. If someone tells you to identify a perfect fourth above F, you should be able to visualize a musical staff with an F and a B flat. This will improve your musical imagination and make learning intervals a practical application. By visualizing a musical staff, you can begin to notate melodies in your mind, without the use of staff paper. This will also further improve your understanding of musical intervals.
Knowing what each interval sounds like will help you to identify intervals on the staff. The reason for this is because of the aural connection that makes it possible to look at two notes on the staff and hear the sound. Sometimes, it is easier to look at two notes and hear the interval than it is to see the interval. Practice listening to and comparing groups of intervals. For instance, start by identifying the difference between a perfect fifth and perfect fourth. Then, add the major and minor thirds. Continue to add intervals until you have learned all of them.