Terraria, like any other survival game, has you using the resources and items you find in the wild to make yourself more equipped for anything thrown your way. This remains true with Life Fruit, an item in the game that will permanently increase your max life by five points when you eat it (if you have at least 400 max health). Here is how to get some for yourself.
Before you begin looking for Life Fruit, you need to be playing on Hardmode. Next, make sure you have your maximum health at 400; otherwise, the Life Fruit effects will not take hold. Now you need to defeat at least one of the three mechanical bosses found in the Underground Jungle to make Life Fruit begin growing. These bosses are called The Destroyer, The Twins, and Skeleton Prime. There is a 10% chance each will spawn after dusk when you destroy a Demon or Crimson Tower, but you can also summon one using mechanical parts dropped from enemies in Hardmode or crafted at an anvil. After they appear in your world once, they will keep reappearing until defeated.
Once a mechanical boss is defeated, Life Fruit will begin growing only in the Underground Jungle. Be on the lookout for an orange-colored heart growing from jungle grass blocks. If you create your own Underground Jungle biome with jungle grass blocks, Life Fruit will begin growing in it as well, so you technically can create a farm if desired. Just make sure to leave room for it to grow, and keep in mind that it is rare for it to grow on any occasion, so do not expect to find much of it.
If you are having trouble finding the item in the wild, there are a couple of relatively easy ways to track it down. First, Life Fruit appears on the minimap as a bright green square. Looking carefully at your map and noticing the difference in greens will be the easiest way to track them down, although it may frustrating when they seem to blend in together. See the image below from the official Terraria Wiki for reference.
Also, Life Fruits have the highest chance of any item in the game for being pointed out by Metal Detectors. Once you max out your health, this can be annoying if you are looking for ores, but it’s extremely helpful during the process.
Using a Life Fruit when your max health is at least 400 will further increase your maximum amount by five each time until you reach 500. This means that 20 life fruit will need to be found to complete your health bar. Afterward, the Life Fruit is best sold as it will only replenish five health upon consumption. It can be sold for two gold coins per fruit.