The RAE recommends the word "español" although it says both "español" and "castellano" are acceptable. They give some reasons here:
http://buscon.rae.es/dpdI/SrvltGUIBusDPD?lema=espa%F1ol
In Spain, generally speaking, "castellano" would be mainly used by people politically concerned in the sense Poli pointed out. This will be more usual in regions that have their own language (Catalonia, the Basque Country, maybe Galicia...).
A Google research:
"Cursos de español en Madrid": 203,000 resultados
"Cursos de español en Barcelona": 205,000 resultados
"Cursos de castellano en Madrid": 5 resultados
"Cursos de castellano en Barcelona":5 resultados