What is best transportation from Madrid to San Lorenzo de El Escorial to visit El Escorial? Is there a
convenient local train? How long does it take? Once we arrive in the town is it walking distance to the castle or is there local bus transport to take you there?
That's the Cercanía suburban train, leaving from all the major stations. This gives the schedule. It's a nice walk from the station through a park. Look at Google Maps or ViaMichelin for the route. Remember to keep the ticket. Unless it's changed since I used it, you need it to open the gate on leaving the platform.
You also have frequent bus options departing from Madrid Moncloa bus station, platform 11, and dropping you a bit closer to the Monastery. Or, shuttle buses usually work with the train schedule to cover the distance from El Escorial train station to the monastery.
The bus is much more convenient. It drops you off just a few blocks from the site. It's about a 45 minute ride as I recall. The train station is quite a distance and an uphill hike. Once at Moncloa station, look to see where the El Escorial buses depart from. They should be about every 30-60 minutes depending on day and time.
quite a distance and an uphill hike
One mile through a shaded park with a hardly noticeable gradient. But maybe for the return journey?
We took the bus last summer. As an American from the suburbs who never takes our own busses, the idea of taking a bus felt more confusing to me before we went, but it was really quite simple. Once you're there, it makes more sense. Take the metro to Moncloa, walk up the street about a block to the bus station, go to platform 11 (it's sort of below street level) and get on bus 661 or 664, paying when you get on.
It's a pleasant and scenic walk to the castle/monastery and well marked. Up hill a little, but a nice area with cute shops and pretty parks.
El Escorial is splendid, well worth the trip. Enjoy!
Forgot to add, trip from Madrid takes about an hour.
From Madrid you take a bus. I think it takes a little over an hour. Yes, it is within walking distance to just about everything you will want to see.