You can send sound waves of any wavelength into your instrument, but the trouble is that only specific wavelengths correspond to standing waves. The other waves will just die out because of destructive interference.
When your sound wave collides with the closed end of a pipe for instance, it gets reflected back. If the wavelength is not right, the reflected wave will interfere destructively with the incoming wave. However, for a standing wave, the intensity of the wave at the closed end is near zero. At open ends, no reflection happens, so the optimal situation is to simply have maximal intensity there. That's why "nodes" will happen at closed ends and "anti-nodes" at open ends.
http://en.wikipedia.org/wiki/Standing_wave
I greatly recommend the online book "Music: a mathematical offering" for further details.