Food is necessary for three reasons: You will die if you run out, you cannot sprint if you run low, and you wont regenerate health if you aren’t full. Food only comes from animals and from farming, so it is important that you do one or the other
You can kill: Pigs, Cows, Zombies (not recommended), and chickens
Pigs only drop pork, cows drop steak and leather, and chickens drop feathers and chicken. You must cook your meat before you eat it, thus adding another reason (the others being torches and ores) to find coal early in the game.
You can farm: Watermelon, Bread, Soup, and fish (in a way)
To get watermelon, you need to find seeds from dungeons, making it difficult to get early in the game or any time, for that matter.
To get bread, farm wheat by hoeing grass near water, planting seeds, and waiting. The waiting period makes it less useful, so ideally you can find a village and use their wheat. Make bread by placing 3 wheat next to each other for one bread.
To get soup, find both types of mushrooms. You will need a wooden bowl, too. You can find mushrooms in swamp biomes, which makes this a good choice for food early in the game.
Fish, although they are meat that needs to be cooked, can be ‘farmed.’ They are not hunted, instead you just need a fishing hook, which is relatively easy to acquire, and find deep water. Then, cast your line and wait for a bite. When the floater starts bobbing and dipping under the water, right click again and you should be presented with a fish.
Other: There are a few other items, like cake, cookies, and golden apples, that can also be eaten. They are not to be considered unless you are late in the game, because they are all hard to make compared to other food sources.