Mexico City is certainly one of the more affordable cities in North America, but it’s not quite as cheap as many people expect. It also offers a huge range of places to stay and eat, so backpackers on a tiny budget can get by for very little while luxury travelers can find the best of everything not far away.
Hotels and hostels in Mexico City can offer good value, though on the lower end of things you might find the standards to be below what you are used to. Food and drinks can be very cheap if you concentrate more on street stalls and places that cater to locals. If you insist on places with English-language menus then you might find the city to be fairly expensive.
Fortunately most of the main attractions are free or rather cheap, and city tours are quite affordable as well. This is really a city where you can get by on nearly any kind of budget as long as you are crafty enough to find your comfort zone.