Hunger is a feature in Minecraft that requires you to eat in order to survive. Hunger is not used in Creative mode, nor on Peaceful difficulty, nor on Pocket Edition, and it's generally impossible to eat (except golden apples) in those modes. Hunger is represented by a bar next to the health bar. As this bar drains away, various unpleasant things happen, starting with losing your healing ability, and culminating with taking starvation damage. There is also a hidden variable called "saturation", which is exhausted first, before your visible hunger starts to drop. Eating food will replenish various amounts of both hunger and saturation.
 Effects of Hunger
There are two hunger variables you need to worry about: Your visible hunger bar, and a hidden value which is officially miscalled "saturation". Both range from 0 to 20 (hunger is shown in half-shanks), but saturation cannot exceed your hunger. As you move about, fight, mine, etc, saturation drains away, and when saturation reaches zero, your hunger bar will start to ripple, and hunger starts to drain away in place of saturation. In order, the things that will hunger you the most are: Healing damage (most of a food point per health point!), a "sprint jump", sprinting any distance, attacking monsters or receiving damage (from any source), and jumping. More specifically, sprinting two meters costs the same amount of hunger as jumping once, and sprinting three meters costs as much hunger as taking damage or attacking does.
When your hunger drops below 90%, you stop healing automatically. When it drops below 30%, you will be unable to sprint. And when your hunger drops to 0, you start taking damage from your health. On Easy mode, starvation damage will not lower you below half your maximum health, while on Normal mode, it can reduce you to a single hit point. On Hard mode, starvation can kill. Interestingly, the Protection enchantment on armor reduces starvation damage.
While eating is essential to keep your health up, it is not always needed. On Easy and Normal modes the health bar will stop decreasing just before death, so if the player takes care not to take any further damage, they can continue playing normally. In fact, many players drain their hunger to 0 whilst making a farm. Obviously, this is much riskier in multiplayer servers with PvP, as well as adventuring.
With the exception of Golden Apples, you cannot eat when your hunger is at max; when you do eat, each food item restores a specific amount of hunger and saturation. Many items restore more saturation than hunger, but remember that saturation is itself limited by hunger. Do not worry about "wasting" hunger, because if you are losing visible hunger, your saturation meter is empty, and you will soon lose more hunger anyway. Thus, it is still a good idea to eat even when your hunger bar is nearly full, as you will also gain saturation.
Food is a specific type of item that can be eaten by clicking with the mouse, but (mostly) only when you are actually hungry -- that is, when your hunger bar is not at maximum. Food restores both the hunger bar and saturation, with different foods filling different amounts of each. You can obtain food through crafting, farming, and killing mobs. Many of the more nourishing foods (that is, meat and fish) need to be cooked (smelted) for full effect. (If the animals were killed by fire, they may drop their meat pre-cooked!)
Foods can be divided into five tiers, according to how much saturation they restore per hunger unit ("nourishment"). As noted above, more nourishing foods should be eaten when the hunger bar is closer to full, to avoid wasting their high saturation values. This leads to an oddity: When you're very hungry, it's better to eat dessert first, but save room for the real meal!
A few foods also have special effects, mostly bad. While the golden apple can heal you, other foods can poison you (losing hit points), or give you food poisoning (draining your hunger bar). For these, there is milk, obtained by using a bucket on a cow. While milk doesn't restore hunger or saturation, it does wipe away all status effects, which can be handy when you need to eat something that may poison you or give your food poisoning.
Here are the various foods, by category:
 Special Foods
These can be found in dungeon chests or crafted for yourself, and are the only food that can be eaten with a full hunger bar. Besides feeding you, a Golden Apple will give you 5 seconds of regeneration, healing up to 4 () over that time. Also, as of the 1.6 update, golden apples give you 'absorption' -essentially giving you more health.
These can only be crafted. They restore more hunger, and even more saturation, than golden apples, but without the regeneration. See Potions to see how the Golden Carrot can also be used. Can also be used in horse breeding.
 Top-tier foods
Beef and porkchops are both easily obtainable during the first few days of playing in singleplayer, and can be farmed for a reliable supply. They are dropped (raw) by cows and pigs, and can be cooked in a furnace. Since animals spawn rarely, you really should start penning and breeding some of them after the first few days. Cows are lured and bred with wheat, pigs with carrots. Mooshrooms give beef the same as cows. It is actually much more efficient to breed Cows with Wheat than to use the Wheat to craft Bread due to 2 Wheat being used to breed Cows (thus supplying up to 3 Steaks) and 3 Wheat being used to craft a single piece of Bread that will heal very little. Also, Steaks provide much more Saturation, and this method also allows for the farming of Leather
This may seem an odd member of the "top tier" -- it only restores one shank of hunger, and poisons you to boot (4 () of damage over the next few seconds). As of version 1.6, healing 4 points of damage will cost 3 hunger points in itself.
However, it does restore much more saturation than you'd expect, and if it brings you to or above 90% hunger, your health will start to regenerate. The poison duration does not stack, so if you eat several in a row, you will be poisoned for only the time from finishing the first one, to 4 seconds after finishing the last one. There are a few special cases where eating spider eyes can be better than nothing:
- If you're already at or near 1 HP, you're not losing much. And if you're on Hard difficulty, hunger can kill you but poison can't.
- If you can fill your hunger meter, the saturation from the first eye will heal the poison damage. Note that 5 spider eyes will max out your formerly-empty saturation.
- Milk can remove the poisoning early. Even so, you should only try this if you are going to bring your hunger meter to 90% or above.
 Second-Tier foods
Obtained by killing chickens, which aren't rare and can easily be farmed with eggs and/or seeds. Cooking it eliminates the risk of food poisoning.
If you have access to water, fishing is a great way to gather food, slow but steady. If possible, find or create a sheltered and well-lit fishing spot so you can fish overnight, and especially when it's raining or storming.
Given only a wooden bowl and both sorts of mushrooms, mushroom stew can be made without a crafting table or furnace. Or, if one of the fabled Mooshrooms is present, you can right click it with your bowl to have it filled with stew. Either way, the major disadvantage of this food is that the stew bowls are not stackable. However, the empty bowls and mushrooms are, so you can make (or milk) it a bowl at a time. Mushrooms can be farmed, with some effort.
Bread is one of the most commonly used foods, and is also one of the most renewable. Easy to make, it is crafted from farmable wheat. Tall Grass needs to be destroyed in order to obtain the seeds necessary for farming wheat. One downside is that it usually takes a few days to establish a wheat farm (though even so, wheat is usually the first crop most players can grow). Also, bread is fairly inefficient: Wheat grows one stalk to a farmland block, and each piece of bread is made from three wheat.
Found in the same way as potatoes, these restore less hunger than a baked potato, but carrots require no cooking. They can, however, be crafted with gold into Golden Carrots.
 Third-tier foods
These have a nourishment of 0.6, suitable for filling up your hunger meter before you eat something more substantial. These include the uncooked versions of potatoes and the various meats, plus a few "half-dessert" foods.
Crafted from pumpkins, eggs, and sugar, this can restore as much of your hunger meter as cooked beef, but doesn't add nearly as much saturation in proportion.
Apples are a fairly rare food item. They are occasionally dropped by oak tree leaves when those are destroyed or decay, so if you are chopping a lot of oak trees you will probably get a few. They can also be found in dungeon or mineshaft chests, or purchased from villagers. They can also be crafted with gold into Golden Apples.
Melon Seeds are somewhat hard to obtain, but once you plant them and set up a melon farm, Melon Slices can be acquired in large quantities. (They can also be carried as Melon blocks for higher density.) Each slice gives 1 food unit; unfortunately they give little saturation. The seeds can be obtained from naturally generated chests (dungeons, Abandoned Mineshafts, and so on) while the slices can be purchased from villager farmers, and then turned into seeds. Occasionally, you may also find melon blocks in Jungle biomes in small patches, quite like pumpkins in other biomes. Melon is very good if you find it early or mid game, as it comes out in large quantities but in late game you will have lots of better foods like golden carrots
Raw fish doesn't feed you nearly as well as cooked ones, but raw fish can also be used to tame and breed ocelots.
Raw Chicken will cause food poisoning 30% of the time.
 Raw Beef and Raw Porkchop
Again, uncooked meat isn't nearly as good as cooked.
Similarly, baked potatoes are much better than raw ones.
When farming potatoes, you will get an occasional poisonous one. This cannot be cooked, and while it actually restores more hunger than a normal raw potato, it also has a 60% chance of poisoning you for 2 () damage.
 Junk foods
Formerly a trophy item, these now are a cheap small-change food. They are easy to craft, and 8 cookies are created per crafting. A single recipe restores as much hunger as a cooked porkchop or Steak, and has a better wheat-to-hunger ratio than bread. Alas, they provide only a fraction as much saturation as any of those.
Cake is the only food that must be placed before eating. However, cake is harder to craft than most food items, requiring three milk buckets, sugar, wheat, and an egg. Cake is not stackable in your inventory. It is recommended that you keep cakes in a place that you travel a lot for quick healing. It has a special place in multiplayer as a "social" food, which can be placed and shared.
Rotten Flesh is obtained by killing a zombie. They cause food poisoning 80% of the time so they should be eaten only in an emergency. Because the poisoning effect does not stack, you can eat many of them at a time without losing too many hunger points, especially if you wash them down with milk to cure the illness. Zombie flesh is best used to feed or breed wolves, because they are not affected by food poisoning.
Clownfish is a fairly rare catch from fishing, and it cannot be cooked.
If you like a 100% chance of Hunger III for 15 seconds, Nausea II for 15 seconds, Poison IV for a minute, and to take more damage than be lit on fire, then go ahead and eat the pufferfish! Also, this also cannot be cooked. See Potions for the pufferfish's beneficial use.
 Emergency measures
If your hunger meter is dropping and you have no food in hand, there are a few emergency measures you can take, depending on available resources:
- If you have both kinds of mushrooms handy and enough wood for bowls (three planks of any type), don't forget mushroom soup!
- If you have a bucket and a cow, milk the cow: The milk will let you fill up on rotten or raw meat, then cure the resulting illness. You can even eat spider eyes or poisonous potatoes, and then cure the poison.
- On the surface: Kill a cow, pig, or chicken. Do cook the meat if at all possible, but even eating it raw will fend off utter starvation.
- If you have any potatoes or carrots, and some bone meal (craft 3 from one skeleton bone), you can make a hoe and till some dirt near any water source, then plant your vegetables and use the bone meal to make them mature more quickly. Until recently, each bone meal would instantly bring a plant to maturity, but as of version 1.5, they will only grow the plant partway, taking several pieces of bonemeal to get a mature plant. Cooking the potatoes is also a good idea.
- If you have the bone meal but no carrots or potatoes, you can destroy some Tall Grass near a river or lake, make and use a hoe, then plant Seeds and use the bone meal to rapidly grow your wheat. The same caveats as above apply to the use of bone meal.
- If you have string, wood, and water: Fishing is relatively quick, at least you can get one or two fish within a minute. Note that you can fish in a waterfall.
- A last-ditch measure: If you're close to your bed or spawn point, stuff your inventory and armor into a chest or two... then die. On hard mode, you can just wait to die of starvation, otherwise good methods are drowning, jumping off cliffs, or dropping gravel/sand on yourself. You will respawn with full health and hunger bars, and can then reclaim your stuff. Naturally, this method doesn't apply in Hardcore mode. Note that this isn't a totally free solution: you lose experience.