The best way to get to Madrid is to take a flight to Aeropuerto Adolfo Suárez Madrid-Barajas (IATA code: MAD).
The lines C1 and C10 of Renfe trains, the metro line 8 as well as the bus lines 101, 200 and Express 203, connect the airport to the city. The average cost of a one-way train ticket is of 2,60€. Taxis have instead a fixed-cost fare of 33€ to the city and vice-versa.