The AP and station exchange supported data rates in 802.11 management frames -- for example, APs send Beacon frames that identify their supported data rates, and APs and stations exchange supported data rates in Association Request and Response frames. Thus, stations can learn about an AP's capabilities and use a supported rate without requiring all stations to use the same rate. Once connected, rate can actually be auto-adjusted for changes in signal strength, distance, and other environmental conditions.
Having APs support both OFDM and CCK is intended to ease migration from 802.11b to 802.11g, just as you describe. Newer stations can take advantage of faster data rates, while older stations operate at slower rates. However, you are probably asking this: if there are 802.11b stations present, how much do they impact the performance of 802.11g stations? You may have heard about some early interoperability testing that identified problems (see PCWorld, 802.11-Planet). Early testing was conducted with pre-standard "G" products, and the standard was tweaked to address known problems before being ratified in June. Recent press releases suggest that kinks have been resolved (for example, see Texas Instruments). Further field experience is needed with final-standard-compliant 802.11g products to prove this out.