Basically you get food from fertile land, apiaries, oasis, wild wheat, and fruit groves (I think that's all of them). As an example: Fertile land gives you +4 food which means you can build 4 buildings that require 1 food (houses, merchants, etc...). Once those 4 are built it will no longer show you as having any food on the top of the screen.
-Food does not accumulate over time like gold or materials
-If it's showing you "have food" it means you can build a number of buildings that require food equal to how much food you "have."
-If it's showing you "have no food" it means you've built all the buildings you can for your food income.
-Having positive food is of no benefit, build more houses, merchants, etc... as soon as possible (unless saving for new cities or something)
-It IS possible to have negative food, not exactly sure what happens. Seemed like my population starved in random cities but since the actual population doesn't matter once a city is already level 4 unless you want it to grow to level 5 I didn't care much.
As someone else said on here somewhere basically at the start of a turn it calculates how much food you have, say 9, and then calculates how much food your buildings use, say 8, and returns how much extra you have, in this case 1. That 1 food does not carry over to the next turn, it just vanishes and on the next turn it recalculates your food again.
Hope this helps.