It doesn't switch impedances; it's just a fixed low-impedance output. Impedances don't need to be matched for audio applications. With low-frequency audio signals, generally the voltage carries the information and the current follows along as determined by the load impedance. With RF circuitry where everything is routed in transmission lines with controlled impedances, the information is carried in the power (product of current and voltage). In this case, if the impedances are not matched, there will be issues. You can get away without impedance matching at audio frequencies because the output driver amplifier can compensate for various load impedances much faster than the rate of change of the signal. So long as the amplifier can drive the required current, there should be very little distortion. Also, the wires are generally much shorter than the wavelength, so reflections are not an issue as they might be with RF.
In an audio card, the output driver amplifier is most likely little more than a voltage follower or an op-amp with a relatively low gain, possibly with a series current limiting resistor. Let's say the amplifier can drive 100 mA and you're playing a 1 kHz sinewave that happens to come out of the card with a 1v amplitude (2v peak to peak). With no load, the voltage will not be distorted as the current required will be basically zero (it will not be because of the feedback loop and any parisitic capacitance, but the current will likely be far less than 1 mA so it can be neglected). If you attach a 600 ohm 'line in' device, the amp will need to drive a peak of 1.67 mA. If you attach a 16 ohm headset, the amp will need to drive a peak of 62.5 mA, well within its capabilities. However, an 8 ohm headset would require 125 mA, which would cause the amplifier to go into current limit and clip the peaks off, distorting the sound. Turning the volume down would mitigate this, however.