To drive a car in Spain you need a valid driving license issued by the proper authority either in Spain or in your "home" country. If the text on the licence is in Chinese, Russian or other non-Roman characters a translation to Spanish or an International License is required.
EU-citizens can use their national license to operate a car in Spain. However, you need to take your licence to the provincial traffic office to have it registered in their computer. Nationals from other countries must obtain a Spanish driving licence after one year.
As a visitor (i.e. a non-resident) from EU you are permitted to drive your car in Spain for a period of up to 6 months in a calendar year. (So, it's possible to use the car from July 1. this year to June 30. next year!).
For persons residing outside the EU a car can be used for up to six months a year, but the car may only be operated by the owner, his spouse or his children.
While it is possible to import a foreign registered car to Spain the paperwork involved is awesome, and many people find it easier to sell the old car before they move, and then buy a new or used car after arrival in Spain.
When you want to buy a new or used car in Spain you need one of the following documents:
A copy of the "escritura" (deed) to a property, or a copy of a lease for at least one year.
An official recidence permit.
A certificado de empadronamiento (a certificate showing that the bearer is a registered inhabitant of the municipality that issued the certificate).
Just like in most other countries you need to have the car insured for damage it could cause to persons or property.
There are a number of categories of car insurance:
Rent-a-cars are quite inexpensive, and in typical tourist areas - and all airports and major cities - there are a number of companies renting cars at attractive prices.