Names given to the Spanish language
Formally speaking, the national language of Spain, the official Spanish language, is the Castilian language (as opposed to regional Spanish languages like Galician, Catalan, Asturleonese and Basque). As such both names, "español" and "castellano", have distinct and independent meanings that may be required for clarity in some specific contexts.
Generally speaking, though, both terms can be used to refer to the (national) Spanish language as a whole, with a preference for one over the other that depends on the context or the speaker's origin. "Castellano" (as well as "Castilian" in English) has another, more restricted, meaning, relating either to the old Romance language spoken in the Kingdom of Castile in the Middle Ages, predecessor of the modern Spanish language, or to the variety of Spanish nowadays spoken in the historical region of Castile, in central Spain.
Castile and León
In addition to the Castilian language, in Castile and León two other languages or linguistic varieties are spoken in small areas of the community: the Leonese language, that "will be subject to specific protection [...] because of its particular value within the Community's linguistic heritage" (This dialect is only spoken for less than 2000 people, what means this "will be subject to specific protection [...] because of its particular value within the Community's linguistic heritage" is not accomplished) and Galician language, which, according to the Statute of Autonomy, "will enjoy respect and protection in the places where it is usually used" (fundamentally, in the border areas with Galicia of the comarcas of El Bierzo and Sanabria). In the Salamancan comarca of El Rebollar, a modality of Extremaduran language is spoken (of the Asturian-Leonese branch) known as Palra d'El Rebollal. In Merindad de Sotoscueva (province of Burgos) a Castilian is spoken with some dialectal features of the Asturian-Leonese.