What happens when tourists get Covid-19 while on holiday in Spain?

What do national and international tourists have to do if they are exposed to a positive case or develop Covid symptoms while on holiday in Spain? Do the rules change for close contacts? 

Source: What happens when tourists get Covid-19 while on holiday in Spain?