A car with a foreign registration must necessarily have insurance in Spain

What obligations do I have to have a car with a foreign registration in Spain?