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.
National and regional identity in Spain
Valencian (a southern dialect of the Catalan language) is spoken alongside Spanish in around two thirds of the territory of the Valencian Community and in most of the more densely populated coastal areas. It is not commonly used in some inland areas and in the far south, and its use has declined in the two main cities of Alicante and Valencia. According to a 2010 survey 48% of respondents said they speak Valencian "perfectly" or "quite well", and for 32% it was the language most commonly used at home.