From the Super Mario Wiki
The Blue Coin Block is an object found in Super Mario 64 and its remake Super Mario 64 DS.
When Mario finds a Blue Coin Block and Ground Pounds it, Blue Coins show up nearby. Mario has a short time to gather the Blue Coins, after which they disappear. The block cannot be reused. The amount of Blue Coins that appear varies greatly with each course, ranging from two to ten or more; they are often necessary to obtain the 100-coin Power Star from the levels they appear in. During the time that blue coins appears on the screen, applause can be heard. It ends either when the time runs out, or when Mario collects all the blue coins.