It depends on how much prep you're prepared to do. You can make a hearty lentil curry very cheaply, for example, if you buy the basic ingredients in bulk. 'Course this presupposes that you know how to cook, but that knowledge is very nearly free, the only investment is in time.
But the time investment is considerable. One reason I don't cook more (and I do cook 3-8 times a week) is that to make anything except a few very simple dishes, there's so much coordination that it's barely worth it. Most recipes call for 5-15 different ingredients, and the chances are very good that you'll be out of at least one, and if you try to stock up so that it's less likely, stuff goes bad before you can get to it. The only solution I know is to go to the store to buy ingredients every day or two, which adds an average of half an hour prep time to each meal (assuming you go every two or three meals, optimistically).
Also, the first few times I make something, it'll often not be very good, meaning that I have to be prepared to eat a few meals I don't even like, and which take extra time, just to learn a new dish. If I'm in an experimental mood, that's fine, but most of the time I just want to put in minimal effort and have a nice meal to eat while watching Sons of Anarchy or whatever.
I guess the summary is: lots of time, and getting the knowledge of how to make something costs several unenjoyable meals and extra cooking time on top of that.
Some poor people have too little free time (the ones working two minimum-wage jobs) while others have too much (the unemployed). It would be interesting to compare the obesity rates of the two groups. I doubt you'd find that the unemployed were thinner.