Foreign Plated Cars
If you are a foreigner in Spain for more than six months (182 days) in one year then legally you must import your car onto Spanish number plates. The six month requirement is on the owner and not the car itself. As the movement of EU citizens is not recorded by passport stamps these days it may be more difficult to prove your status should the police request it. Keep a plane or ferry ticket should this situation apply to you.
EU legislation requires that a car be insured in its' country of registration. An insurance company will require the car to be road legal and ask to see a vehicle inspection certificate. (MOT in the UK, ITV in Spain). You can not obtain a valid test certificate in the country of registration if the car is in Spain.
In practice it is not difficult to find insurance agents who will insure your car and who will accept a Spanish ITV certificate as evidence of road worthy-ness. However by not being strictly legal you risk an insurance company refusing to meet a claim.
Spanish Law permits a foreign car to drive on Spanish roads as long as the car is road legal in its own country. A UK car for example without a UK MOT can not be legal in Spain unless that car is not more than three years old, in which instance an MOT would not be required. Cars only legally require an MOT after their third anniversary of its' registration.
There are many foreign cars in Spain and the police do not appear to make it a priority to check their paperwork.
Non EU citizens who are tourists in Spain for less than six months a year may keep their foreign plated cars in Spain as long as they have them "sealed" or "precintado" by customs officials.