well.. i've been there a couple of times but never really had the time to get to the bottom of that city so far. Anyway, Ama Records is a nice shop to start; it's based in a sort of small and trendy shopping-center called Fuencarral, ask any hip-looking youngster and they'll show you the way. Calle Fuencarral 45, 28004 Madrid
Especially look for Madrid based labels like Hitop (www.hitoprecords.com); you won't regret buying excellent latin compil "Atitetoca" or one of the "Improvisto" rare Spanish jazz series, for instance!
and if you're there in the weekend, try to tune in to 100.4 FM, they've got some nice radioshows on Radio Circulo de Bellas Artes, Dial Soul, hosted by Heavy Usker and others...
feliz viaje!