The UK’s Foreign and Commonwealth Office (FCO) advises against all but essential travel to Spain. Spain declared a State of Emergency (“Estado de Alarma”) on 14 March, which introduces a series of measures including significant restrictions on movement throughout the country in response to the coronavirus outbreak.
Transport services will be operating at reduced levels. Public gatherings are banned, most shops other than those selling food or other essential items such as pharmacies will be closed, many businesses and all schools and universities are closed, and all citizens have been instructed to remain at home except when going about a limited set of activities in particular to buy food or other essential items, to return home to their primary residence, to go to hospital or other health centres, to go to work (if unable to work from home), to carry out caring or similar duties or in case of real need.
UK nationals currently in Spain should follow the advice of local authorities. Anybody planning to travel to Spain should consult their airline or tour operator.