The Plaza Mayor of Madrid was built in the 1400's on the same location as the old Plaza del Arrabal (square outside the walls). It was used as a market in the Middle Ages. Don't eat here, as there are many tourist traps. Go to 'Mercado San Miguel' to eat, which is very close by.
San Miguel Market is the most popular market in Madrid among tourists since it is located in the centre of Madrid, within walking distance from Plaza Mayor. The market is not a traditional grocery market but a gourmet tapas market, with over 30 different vendors selling a wide variety of freshly prepared tapas, hams, olives, baked goods and other foods.