It is no cheaper to rent a car when you are in Spain than booking it on the internet before you arrive.
The best thing to do is to visit several car hire websites and compare prices.
Here is a selection of Car hire companies who operate in Spain.
With the bigger companies you can pick up a car from one place and drop it off in another.
Avis Car Rental -
Hertz Car Rental
Alamo Rental Car - Official Site