How to get around Spain:
The best way to get around Spain is by plane, the fastest (the distances from city to city are not short) and the cheapest (40-50€ per flight) mode of transportation.
Travelling by train and bus are other options, though the former is often more expensive than flying and the latter is not always cheap and usually time-consuming.
Renting a car is good idea for regional travel (Andalusia, Catalonia, Castile, the North), though strongly discouraged for getting around major cities once there. You can find the best offers at Rental Cars.
Walking is the best way to get around cities, as long as you're staying in or near the centre. Big cities (Barcelona and Madrid) have good metro and bus systems.