Airport info:
Madrid Barajas International Airport (IATA: MAD), +34 902 404 704, [2] is located 13km from the city center. It is a one of the largest airports in Europe and is serviced by many airlines, as well as being the homebase for Iberia Airlines. The airport has 4 terminals, including Terminal 4, a new low-cost carrier terminal that has won architectural awards, and might be worth the trip to have a look even if you are not flying.
The airport is connected to the city by Cercanias commuter train (line C-1) and Metro (line 8 pink). From Terminal 4, the simplest option to get to Puerta del Sol (the center of Madrid) is to take the commuter train (look for Renfe Cercanias) to "Nuevos Ministerios" and then transfer to line C-3 or C-4 southbound on platform 8; Sol will be the first stop. Alternatively, you can also take the Metro to Nuevos Ministerios from any terminal but it will probably take a bit longer. Metro tickets to/from the airport cost €2.50, while Cercanias tickets cost €2.15.
Taxis from the airport to the city center cost €32-40.