BriocheBriocheBrioche Go to Txirimiri on Calle Ibiza (east of the Retiro park). All the tapas are great.
Also go to Mercado San Anton in Chueca (corner of C/Augusto Figueroa and C/Barbieri), go to the first floor and you can get a drink, a small tapa or more tapas o raciones to make a whole meal. There are all sorts of different stalls. On the rooftop is a nice bar, but it closes early. Also, on the first floor, the bar sells cheap and good raciones of all the classic Spanish dishes like pisto con huevo which you can buy and share between you.
Mercado San Miguel next to Plaza Mayor (off Calle Mayor) is a similar vibe but more touristy and expensive. I would go there only for the jamón Serrano as it's cut right in front of you and no more pricey than in other bars for the same - good - quality.
Mercado San Idelfonso is nice for a drink but expensive for eating. I like the little garden area at the back on the first floor. It's on Fuencarral just south of Tribunal metro station. Also if you do a nose around the stalls they do give you free samples.
For cheap and cheerful very filling tapas at their best, go to one of the El Tigre bars (on C/Las Infantas or the south end of Hortaleza, both in Chueca) and order a drink which will come with a huge plate of fried potato and typical tapas - bread with stuff on top.
El Buo taberna just off Plaza de Chueca (C/Gravina) is also good for raciones to share.
If you get sick of tapas, I strongly recommend the local chain of La Mucca restaurants (lamucca.es) which also serve great, inexpensive cocktails. The bread with tomato (pan con tomate / pan tumaca - with or without jamón ibérico on top) and the platter of Spanish cheeses and meats makes a superb sharing meal. There's one on C/Prado (off Plaza Santa Ana, in the direction of the Prado museum) and one just off Alonso Martínez (bottom of C/Almagro).
If you fancy a short metro ride out of the centre for a great Argentine steak, go to metro Concha Espina on the purple line (line 9) - just 5 mins. ride from Príncipe de Vergara metro station which is at the north east corner of the Retiro park - and to Bayres Beef on C/Pradillo. Delicious, authentic and inexpensive. Superb service and great Malbec too.
Also if you fancy pintxos (the fancy Basque version of tapas, basically), I recommend Orio on Fuencarral. Keep your cocktail sticks as that's how they calculate your bill. Try a glass of Txakoli which is a Basque white wine.
For a nice wine, go to the Vinoteca on the corner of Plaza Santa Ana next to the Teatro Español.
For a treat, check out celebrity chef Alberto Chicote's Asian / Spanish fusion restaurant, Yakitoro. Expensive for Madrid but delicious and not expensive in comparison to London. It's in Chueca.
Lastly, not a place to eat or drink but the Hammam al Andalus (Arab baths) are stunning and still in use as a spa. Book online as they're really popular. The baths are amazing, the massages are so-so, as they're just a cheap mini add on to the baths.
BEWARE OF PICKPOCKETS! I cannot say this enough. Never put down your bag - see how the locals keep them slung across their bodies or on their laps everywhere. Never put down your phone and take the time to put your purse, phone, etc. away properly in the zipped part of your bag rather than rushing and leaving it vulnerable to be stolen. Use a cross body bag and even consider one of those under clothes wallets for your most valuable items. Don't put anything in your pockets. Just be super vigilant all the time.