A reflective jacket and two warning triangles
If you break down in Spain, you should try to stop the vehicle out of the way of the traffic flow as much as possible. Put on your reflective jacket before stepping out of the car. That means your jacket needs to be reachable from the driver’s seat rather than rolled up into a ball and stuffed underneath the small tool kit and the oil can you have in the boot. The glove box is usually a good place to stow it.
You should organise setting out your red warning triangles. One should be placed fifty metres behind your broken down car. If the road is a two-way road rather than a motorway for example, then the second red warning triangle needs to be placed fifty metres in front of the vehicle.
This will warn vehicles coming from both directions that there is a problem ahead.
Ring your car insurance company in Spain for roadside assistance on your mobile phone. Tell them the road you are on and try and if on a motorway in which direction you are travelling. Most breakdown services offered by car insurance companies in Spain will arrive within the hour.
If you do not have a reflective jacket or warning triangles, then you could be fined by the police. This is more likely to happen on a motorway where the police are normally monitoring the traffic flow and can quickly identify a broken down vehicle. Their main intention will be to get you moved to safety and the traffic flowing freely again. However, failure to have the correct equipment in the car may lead them to add to your mechanical woes with a ticket for non-compliance with the road traffic laws.
Although not a legal requirement you might also want to consider buying a flashing warning light.