I was thinking yesterday about how the 802.11 a/b/g/n standards all use different modulation schemes, but my wireless card manages to detect frames from networks that may use any of those modulations. So, when my card detects a signal containing a frame from my neighbor's 802.11b network, how does it know to demodulate it with, for example, DSSS and not OFDM? Does it just attempt all modulations? Does it use some kind of signal sensing?
DSSS vs OFDM: these are different standards (a/g/n vs b, which is obsolete). This situation where you'd need to detect the differences never arises: a beacon from an access point is either of these standards, and that defines what the whole network does. Since the channels for these different modes don't even match, there can't be interoperability. A card that supports both types of networks simply has to listen for both types.
Does it use some kind of signal sensing?
Err, everything a receiver does is signal sensing...
Still, within a modern WLAN, the stations have freedom to use different modulations within OFDM: BPSK, QPSK or QAMs. Atop of that, there's a variety of different forward error correction rates that might be used.
That's decided based on the channel quality estimates that both stations communicate.
The modulation used in a frame is noted in the header symbols at the beginning of the frame, so that the receiver always knows how to demodulate the payload. The header itself uses a fixed modulation (BPSK).