As above, driving in Spain is fine, just beware of the usual things like differences in where signs are on the roads, traffic light sequencing and associated actions e,g There is no such thing as right turn on red. I know of several people who are quite happy driving all over the US but not in Europe, some because they seem to end up with fines too often, its not been my experience. Parking restrictions can also be tricky to sort and a source of fines, so don't let your impatience end up getting you a fine.
If you're not from Europe then you probably need an international driving licence. Many people just don't bother with this and some rental car companies don't ask for it, but if you do get stopped for any reason, you'll probably be expected to have it and fined if not.