You can use the car for up to 6 months a year as long as you are visiting only but it cannot be left in Spain - you must take it out and then return (the police can and do check ferry tickets). The car must remain legal i.e. if it is on UK plates it must have UK road tax and MOT (if applicable) and be insured to cover driving in Spain. When the car needs to have an MOT it must be taken back to the UK for the MOT (you cannot get a valid MOT for a UK car anywhere else but in the UK). Simplest solution is to transfer it to Spanish plates or even easier…buy a Spanish car.
The other option favoured by many is to totally ignore the law (UK and Spanish) and keep the car in Spain, on UK plates and don’t worry about Road tax, MOT or the fact if you don’t have these, your insurance will probably be invalid. You also run the risk of your car being towed away and crushed and/or being fined. Thankfully, the authorities are now clamping down on this type of behavior.