Both use edge-tone (air-jet) oscillation:
Air blown across the embouchure hole strikes a sharp edge, creating vibrations. Pitch controlled by hole coverage (effective tube length) and breath pressure.
Flue pipes: Air forced through a slot strikes a metal lip (like a flute).
Reed pipes: Air vibrates a metal tongue/reed.
Pipe length/shape determines pitch; mouth size affects timbre.
In both, the vibrating air column resonates within the body, reinforcing frequencies for rich tone.