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: 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 the remains of Phillip II 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:
The Basilica contains two great cenotaphs on either side of the high altar: to the right, that of the founder, King Philip II; on the left that of the Emperor Charles V. The sculptor Pompeyo Leoni was responsible for the gilt bronze statues in the two royal groups.
The Pantheon of Kings is directly underneath the altar in the Basilica and is worth the extra money for the full priced ticket.
The magnificent Gallery of Battles was recently restored and shows scenes commemorating battles from Phillips military campaigns.
The Chapter Houses with the collection of paintings from Tintoretto, El Greco, Titian and others.
El Grecos painting of "The Martyrdom of St. Maurice".
The Library and its vaulted ceiling decorated with frescoes.
Most visitors arrive from Madrid, mostly on day trips. Access from Madrid is easy due to the large number of local trains every day. Trains can be caught at either the Atocha or Chamartin stations in Madrid. If you take the train, once you arrive in the town of El Escorial you will most likely want to take the local bus upon exiting the train station to get to the monastery (otherwise it is a long, uphill walk). Buses from Madrid leave from the Moncloa station and will drop you directly in front of the monastery.