Madrid's Barajas airport is often the best option for getting in and out of the city; the trains can be just as expensive as flights, and buses are a bit of an endurance test. Driving is quite a good option, as Spain's main highways feed into Madrid, but they can be a little terrifying for the inexperienced.
Madrid's metro is the quickest and easiest way to get around the city, with cercanías (regional trains) and buses close runners up. With such good public transport and a compact, walkable city centre, you don't need a car, although getting hold of one and negotiating traffic in Madrid is comparatively simple. Then again, taxis are cheap and (usually) stress-free.