The Alcázar really does make an excellent distant backdrop for whatever else is going on in the foreground, with its distinctive turrets; and that is what it has mainly been used for in a number of films.
The original Alcázar of Toledo was once a Roman palace in the III century. Restored under Charles I and his son Philip II in the 1540s.
In 1521, Hernán Cortés visited Charles there following his conquest of the Aztecs.
The castle was rebuilt between 1939 and 1957 after the Spanish Civil War.