From the Super Mario Wiki
Ads keep the MarioWiki independent and free :)
Paper Mario series
In Paper Mario, Recovery Blocks are transparent blocks with a heart floating in the middle of the block. There are multiple different ones scattered throughout the game, each one refilling all of Mario's HP and FP when hit.
Paper Mario: The Thousand-Year Door
Recovery Blocks return in Paper Mario: The Thousand-Year Door, only now, it costs Mario a few coins for the health benefit, indicated above the block. The amount of coins required increases as one progresses through the game. Their design is very similar to that of their design in Paper Mario. These blocks are usually, if not always, found right before a boss fight, and right when Mario enters a new area such as Mt. Rugged or Hooktail's Castle.
Paper Mario: Sticker Star
Recovery Blocks reappear in Paper Mario: Sticker Star, though they only fully recover Mario's HP. They function the same way as they do in Paper Mario, allowing Mario to use them at any time for free.
Mario & Luigi series
Mario & Luigi: Superstar Saga / Mario & Luigi: Superstar Saga + Bowser's Minions
In the Japanese version of Mario & Luigi: Superstar Saga, Recovery Blocks appear in three locations; the Beanbean Castle Sewers, Oho Oasis, and Teehee Valley. They are white blocks with a heart in the middle of the block. However, these are not present in any of the other regional releases. These blocks fully recover Mario and Luigi's HP and BP. The Nintendo 3DS remake of the game, Mario & Luigi: Superstar Saga + Bowser's Minions, retains the block in all versions of the game, and they are found in many more places, typically wherever there is a Save Album.
Mario & Luigi: Partners in Time
A few Recovery Blocks are found in Mario & Luigi: Partners in Time, though they are almost as scarce as in the Japanese version of Mario & Luigi: Superstar Saga. Their design in this game is that of a blue block with a heart symbol in the middle of the block. There is one in Princess Peach's Castle in the present, one inside of the monstrous Yoob, and one just before the throne room of Shroob Castle. As in Paper Mario, they are free to use.
Mario & Luigi: Bowser's Inside Story
Mario & Luigi: Paper Jam
They make a return in Mario & Luigi: Paper Jam. They appear to be a rainbow-flashing rectangular block with a heart on it. Also in the game, they are more common. They are usually placed near locations where bosses are fought (like near the giant door to the summit of Mount Brrr which is where King Bob-omb is fought), and also in Toad Villages. If hit, the trio does not only restore HP and BP, but also restores Paper Mario's copies.