Toledo will be the first choice. 1/2 hour away via the AVE train from Atocha station Leave frequently during the day. Go early, stay late. Better yet, stay over night for a completely different city than the day city.
Segovia is second...the roman aqueduct, best preserved in the world, but better yet is the Alcazar st the other end of town. Bus trip there.
Avila has the best preserved city wall in Europe. Home of St. Teresa, also nice. Take the train from Charmartin to it, or on to Salamanca which has more to offer.
El Escorial. Take the train from Charmartin or a bus. Think the train leaves you a greater distance from El Escorial. Have not seen it, but very much filled with history and worth the visit.
Get the Moon Guide To Spain for good information on these and others.