Madrid and Barcelona are both well-connected international airports served by the metro. A plethora of taxis is always waiting outside. Upon arrival, use your card at an ATM in the airport to save on conversion fees and hit the town with the correct currency.
One of the best and fastest railways in Europe, the AVE train connects Barcelona to Madrid in a mere 2.5 hours; nothing is out of reach. The buses are also well-priced, comfortable, and have free Wi-Fi (pronounced wee-fee here). Car rentals are readily available, though prepare to pay somewhat hefty tolls on highways (autovías) and to park on windy, narrow streets, as many small cities don’t allow cars in the center. Domestic flights are inexpensive via RyanAir, EasyJet, and Iberia airlines.