San Lorenzo de El Escorial is a small hill town on the lower slopes of the Sierra de Guadarrama, built around one enormous building: the Royal Monastery that Philip II raised between 1563 and 1584. It was at once a monastery, a palace, a library, a school and a burial place for his dynasty, and its plain granite walls and long rows of windows sum up the austere, deeply religious court of sixteenth-century Spain.
The town itself grew up to serve the court and is now a weekend escape for people from Madrid, with cafés, pine woods and walking trails into the mountains. Most visitors see the monastery as a day trip, and that works well. Staying a night or two makes sense mainly if you want to walk in the Guadarrama or prefer a quieter base than the capital for visiting Ávila and Segovia.