Although you are probably here to indulge yourself in the Jamon, Queso, Chorizo, Sangria and Vino of traditional Spanish cuisine, Madrid, believe it or not, offers a wide range of international delicacies including Indian, Thai, Chinese, Italian, Japanese, American, Argentinian, vegetarian, and nearly everything else that ends in "ese" or "an". Also there is just as much of a diversity in prices. Whether you are on a "penny & pence" budget or a high roller, you luckily have many options to choose from.
Literally there is some sort of restaurant or cafeteria on every corner in Madrid. If you are on a budget you can stick to a slice of Tortilla Espanola or a trusty Bocadillo de Jamon y Queso which is peddled at every cafeteria in town for about 1 euro. It's the best way to keep from starving yourself to death! If however your diet requires a little more than just starch, salt, and carbohydrates, we recomend that you up your budget to the mid 5-8 euro middle-class meal. 5-7 euros can get you a decent plate at most Chinese and Indian restaurants and can possibly afford you an inexpensive "menu del dia" dish at Spanish restaurants. The "menu del dia" or "menu of the day" is a special lunch that consists of two main courses, a drink (beer, wine, bottled water, coffee), desert and a side of bread. The quality of the "menu del dia" ranges from restaurant to restaurant and so does the price. Normally they range from 7-12 euros, and in general are much better for your health than Tortilla and Bocadillos.
If you decide to have a proper dinner at a proper restaurant you must be aware that gratuity or tipping at the end of the meal is somewhat different here. Although most Spaniards will tell you that about 10% of the total bill is normal, it is not necessarily practiced. I once ate at a table with thirteen people and the bill was nearly 200 euros and they only left 50 centimos! I was afraid the waiter would break down crying, but they didn't seem to blink an eye and thanked us kindly as we left. I also know that foreigners are particularly appreciated by food servers for being generous. So if you decide to be generous, you are welcome to be, but if you really can't spare the change, don't feel guilty.