Regarding licences:
If you come from any EU member country, Switzerland, Norway, Iceland or Liechtenstein, you only need a valid driving licence in force.
If you come from a different country than the aforementioned, you will need an International Driving Licence.
Any tourist who travels with her/his own car should know that he/she may be asked a Temporary Traffic Permission. You may request such permission at Customs and it will be in force for a period of 6 months.
Regarding the vehicle insurance:
If you come from any member of the EU country, Switzerland, Norway, Iceland, Liechtenstein, Andorra or Croatia, you will only have to take your car insurance policy with you together with a proof of payment that may prove its present validity.
If you come from Albania, Bosnia Herzegovina, Belarus, Israel, Iran, Morocco, Moldova, Macedonia, Serbia, Montenegro, Tunisia, Turkey or Ukraine, you will need to make use of the International Motor Insurance Car System, that is, the International Certificate of Third Party Personal (or Casualty) Insurance.
If you do not come from any of the above-mentioned countries, you will have to hire a Border Insurance (a temporary Third Party Personal insurance compulsory for motor vehicles).
As these conditions can be modified, we recommend you to contact Spanish Consulate or Embassy in order to verify these requests before starting the journey.