The simulation above is intended to show how the process of sound wave resonance in air columns works. When a sound wave travels down an air column and reaches the other end, some of the wave reflects back. This occurs whether the other end of the tube is closed or open. If the end is closed, the wave inverts (because it has hit a more rigid medium). This inversion is equivalent to a 1/2 wavelength shift of the wave. If the end is open (less rigid medium), the wave reflects back upright (no phase shift). The reflected wave reflects again when it reaches the other end of the tube, and the process repeats itself.
In the simulation, the original wave and its first five reflections are shown. The thickest blue wave is the original wave. The thickest orange wave is the first reflection. The thinner blue and orange waves are all reflections. The blue waves are all the waves moving to the right, the orange waves are those moving to the left.
Resonance occurs when all of the blue waves overlap and all of the orange waves overlap. This causes a strong standing wave to develop in the tube and the sound gets louder. As you will be able to see by experimenting, this happens when the length of the tube matches up with the wavelength in just the right proportions.