Good question. There is no embedded code of any kind on a music CD. The system works by looking at such things as total playing time, no of tracks, track length and so on and all that info together makes each CD pretty unique. A data base contains that info, and media player just looks for a match. An interesting true story... years after the death of a famous classical pianist, recordings appeared claiming to be of unreleased material. All was well untill Windows media player came along and these discs were being identified as obscure (but known) recordings by other artists. A case of being caught out by technology.
In WMP11, whilst a CD is playing, normally if you go to Library>click on Now Playing>right click on the album cover illustration, you can find the track listings and Save them once found via the Internet.