Nestled in the foothills of the Sierra de Guadarrama, the city's main attraction is the world famous Monastery of San Lorenzo de El Escorial, (El Escorial for short) , a World Heritage Site, that was the political centre of the Spanish empire under King Philip II. It is often visited as a day-trip from Madrid, however it's also a good place to spend 2 or 3 nights so you can visit the surrounding countryside.
Monastery of San Lorenzo de El Escorial: A World Heritage Site, El Escorial was the center of the empire of King Philip II. Originally commissioned as mausoleum for his father Charles V, when building completed in 1584 the grounds included a basilica-church, monastery, royal household and library. The pantheon contains Phillips remains and those of his parents, Charles V and the Empress Isabel of Portugal. You can visit the official website here.
Some highlights not to miss in El Escorial: