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.
Basque language
The Spanish Constitution of 1978 states in Article 3 that the Spanish language is the official language of the nation, but allows autonomous communities to provide a co-official language status for the other languages of Spain. Consequently, the Statute of Autonomy of the Basque Autonomous Community establishes Basque as the co-official language of the autonomous community. The Statute of Navarre establishes Spanish as the official language of Navarre, but grants co-official status to the Basque language in the Basque-speaking areas of northern Navarre. Basque has no official status in the French Basque Country and French citizens are barred from officially using Basque in a French court of law. However, the use of Basque by Spanish nationals in French courts is permitted (with translation), as Basque is officially recognised on the other side of the border.