By "Madrid" is sometimes understood the Comunidad de Madrid which encompasses the following municipalities (all of them together gathering a total of 14% of the Spanish population):
The touristic map below (from the Dirección de economía y empleo) gives a pleasant overview of the main attractions (it has a few glitches (?!)):
View of the Comunidad de Madrid from the frontier with Castilla Léon during our excursion at Navafria: