During your trip in Madrid you can either resort to two things: walk around the city or take pleasure in Madrid transportation. Though both have significant values in your Madrid trip it is always important to know Madrid transportation if in case your feet get tired of walking or if you are going beyond the outskirts of the city.
Buses in Madrid are fast and efficient. Their schedules vary but they usually run around the city between 6:00am and 11:30pm. If you happen to miss a bus, another one (or even two!) will come after 5-20 minutes. Night bus service has an interval of 30 minutes starting from midnight; and every hour from 3:00am-6:00am.
By Cercanías Train
This provincial train service features 10 lines. It is a cheap transportation option that serve key towns in Madrid, including those goind outward the capital.
Traffic in Madrid is quite congested, which makes quite a nightmare, not to mention dangerous. Parking would be another problem too as it is quite impossible to find a good place to park in the city other than in expensive garages. Probably the only time traffic is bearable in the city is when most of the locals head out of the city for a vacation; usually during August.
If you are planning to rent a car to get around and explore the city, you can think again and save it for excursions outside the capital.
Although it is not highly recommended to ride a bike around the city, there are some places and streets in the capital that are ideal for biking.
More of these transportation options in Madrid here, here, and here.