From the Super Mario Wiki
A Crazed Crate is a beige box, similar in appearance to a Cork Block, with the same worried face on each side of it. If Mario grabs a Crazed Crate, the box bounces around three times in the direction Mario is facing, with the plumber holding on. The jumps get progressively higher. After the last jump, the crate explodes and five Coins appear. Crazed Crates can also bounce off of walls, which will not count as one of the three bounces. Crazed Crates appear in Big Boo's Haunt, Tall Tall Mountain, Lethal Lava Land, and Shifting Sand Land. In all levels listed, only one appears, except for Shifting Sand Land, where there are two.
Many Crazed Crates also appear in a Mario Party minigame called Box Mountain Mayhem where the player has to break all of the Cork Blocks to get Coins; however, if they hit a Crazed Crate, the player does not get a Coin and is moved away from the blocks. These crates are called Whomp Boxes.